langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
8
Task/Metaprogramming/SNOBOL4/metaprogramming-5.sno
Normal file
8
Task/Metaprogramming/SNOBOL4/metaprogramming-5.sno
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
* This example provides a bizarrely-expensive addition operation.
|
||||
* It assumes the existence of an expensive procedure—say a database
|
||||
* lookup—to extract the value to be added. This version uses the
|
||||
* typical initialize-on-definition approach to implementation.
|
||||
DEFINE('XADD(X)','XADD')
|
||||
ADDVALUE = CALL_SOME_EXPENSIVE_OPERATION() :(XADD.END)
|
||||
XADD XADD = X + ADDVALUE :(RETURN)
|
||||
XADD.END
|
||||
Loading…
Add table
Add a link
Reference in a new issue