TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Wankadia
from: Michael Stapleton
date: 1996-11-21 15:14:00
subject: Re: Auto string-length determination

-=> On 09 Nov 96  12:56:28 you wrote to me <=-

Hi Paul,

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

MS> What, aren't they good enough to be used in batch files?  :) 

PW> That and the fact that they aren't designed for use in BAT files 

Well, many programs that weren't designed for use in batch files may
still get used in them.  I often run programs from small batch files
(of one variety or another) to improve the interface or set up an
appropriate environment.  If the program won't co-operate, I'm
unlikely to use it at all.

Also, I have my shell set up to print the return code of the
previous program as part of my prompt.  Whenever I see a screwy
return code I regard the offending as highly suspect.  After all,
why should I trust the internal logic of the program, if the
programmer couldn't even get the retrurn code correct...

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

MS> It sure is.

PW> Hmmm...  Is it possible to make a function an operator?

Not in C.  This would be handy for arithmetic with complex numbers,
matrices and even time and money quantities.  OTOH, I hear there is
talk of adding such "operator overloading" to C.

PW> E.g. you could say

PW> int answer = 35 my_plus_function 35;

PW> and get answer to be 70...???

Well, you could say

 #define my_plus_function +

but why would you want to? :)

Michael Stapleton of Graphic Bits.

 * AmyBW v2.10 *
... This tagline is encrypted
--- AdeptXBBS v1.07f (Registered)
* Origin: Mach One BBS (3:713/615)
SEEN-BY: 633/267 270
@PATH: 713/317 711/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™.