[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Re: Question About Functions
From: |
Roger While |
Subject: |
[open-cobol-list] Re: Question About Functions |
Date: |
Mon May 9 22:02:32 2005 |
In so far that a specific function allows it, arithmetic and boolean
expressions
are legal.
In fact you also can nest functions eg. from 2002 standard
syntax rules :
-- quote --
If a function's definition permits arguments and a left parenthesis
immediately follows function-prototypename-
1 or intrinsic-function-name-1, the left parenthesis is always treated as
the left parenthesis of that
function's arguments.
NOTE For a function that may be referenced either with or without
arguments, such as the RANDOM function, careful
coding is necessary to ensure correct interpretation. For example, in the
following:
FUNCTION MAX (FUNCTION RANDOM (A) B)
'A' is treated as an argument to the RANDOM function. If 'A' is instead
meant to be a second argument to the MAX
function, different coding is necessary - either:
FUNCTION MAX ( (FUNCTION RANDOM) (A) B)
or
FUNCTION MAX (FUNCTION RANDOM () A B)
or
FUNCTION MAX (FUNCTION RANDOM A B).
-- end quote --
Roger
- [open-cobol-list] Re: Question About Functions,
Roger While <=
- [open-cobol-list] Re: Question About Functions, Roger While, 2005/05/10
- [open-cobol-list] RE: Question About Functions, Robert Sherry, 2005/05/10
- [open-cobol-list] RE: Question About Functions, Roger While, 2005/05/10
- RE: [open-cobol-list] RE: Question About Functions, Roger While, 2005/05/11
- RE: [open-cobol-list] RE: Question About Functions, Bill Klein, 2005/05/11
- RE: [open-cobol-list] RE: Question About Functions, Roger While, 2005/05/12
- RE: [open-cobol-list] RE: Question About Functions, Bill Klein, 2005/05/12