routine_id scope

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

Forked from Re: Is there a good Windows or cross-platform Euphoria IDE?

dcuny said...

This also confuses me:

public function Icallback( sequence name, atom rid = routine_id(name) ) 
    return call_back( rid ) 
end function 

From your example, it looks like you can not only do an assignment to a non-constant value, but you can pass one of the parameter values.

Where is this in the manual defined? The manual says:

PROCDECLARE ==: [SCOPETYPE] 'procedure' IDENTIFIER '(' [PARMLIST] ')' [STMTBLK] 'end' 'procedure' 
PARMLIST ==: PARAMETER [',' PARMLIST] 
PARAMETER ==: DATATYPE IDENTIFER 

Maybe it's just that my Google-fu skills are lacking, but I can't find any mention default parameter values in the on-line manual.

There are some examples where they are used, but that's not quite the same.

- David

I found some discussion on scope for routine_id but nothing that calls attention to Greg's trick.

-xecronix

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

Search



Quick Links

User menu

Not signed in.

Misc Menu