Re: routine_id scope

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcuny said...

Where is this in the manual defined?

It's in 4.2 Declarations, under 4.2.1.1 procedures.

docs said...

For a number of procedures or functions--see below--some parameters may have the same value in many cases. The most expected value for any parameter may be given a default value. Omitting the value of such a parameter on a given call will cause its default value to be passed.

procedure foo(sequence s, integer n=1) 
    ? n + length(s) 
end procedure 
 
foo("abc")    -- prints out 4 = 3 + 1. n was not specified, so was set to 1. 
foo("abc", 3) -- prints out 6 = 3 + 3 

(emphasis mine)

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu