TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Edwards
from: Paul Wankadia
date: 1996-10-19 11:34:04
subject: Auto string-length determination

On 13 Oct 96, Paul Edwards wrote to Paul Wankadia --

PW> "sizeof String" ???  Are you SURE???  No one else has
pointed that out!
 PE> No one else would call you a Borland Fan if you went "void main"
 PE> either, doesn't say much.

I don't usually return values from programs, that's all :)

 PE> The sizeof operator yields the size (in bytes) of its operand, which
 PE> may be an expression or the parenthesized name of a type.

Oo er...

 PE> Now, as far as I am aware, an "expression" would include
putting the
 PE> variable in parentheses, e.g. x and (x) should both be valid

Well, I hope so.  Maybe that's why I couldn't get the sizeof String when I
was in a different function? :)

 PE> Until then, for the simple cases, I'll just do as they said above. At
 PE> least for the same reason that I don't go x = (y) * (4). BFN.  Paul.

Don't you?  How strange... :)  I suppose, since sizeof is an operator...?
(It IS an operator, isn't it?)

Chow.

Junyer Hakker.

--- PPoint 2.00
* Origin: Junyer's Workshop (3:640/772.3)
SEEN-BY: 633/267 270
@PATH: 640/772 531 201 820 711/409 808 50/99 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.