[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] RE: Question About Functions

From: Robert Sherry
Subject: [open-cobol-list] RE: Question About Functions
Date: Tue May 10 09:22:27 2005

     I think I am starting to get this. What about this case:
            FUNCTION MAX( A   (B - C)        -D )
Here I am thinking that -D is going to come back from the scanner as two
tokens. I am thinking the - in -D should be treated as a binary minus and
therefore we have 2 arguments to MAX. Do you agree with my reasoning?

Bob Sherry

-----Original Message-----
From: Roger While [mailto:address@hidden 
Sent: Tuesday, May 10, 2005 11:41 AM
To: address@hidden
Cc: address@hidden
Subject: Re: Question About Functions

 > FUNCTION MAX( A   B - C        - 3 )

Indisputedly two.
What about this :
FUNCTION MAX( A   (B - C)        - 3 )

You think 3? Wrong, still 2.

FUNCTION MAX( A   B - C        -3 )
Note no space between the "-" and the "3".
That's 3 parameters. The beauties of the unary minus.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]