Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
1
Task/Special-variables/Clojure/special-variables.clj
Normal file
1
Task/Special-variables/Clojure/special-variables.clj
Normal file
|
|
@ -0,0 +1 @@
|
|||
(apply str (interpose " " (sort (filter #(.startsWith % "*") (map str (keys (ns-publics 'clojure.core)))))))
|
||||
12
Task/Special-variables/Common-Lisp/special-variables.lisp
Normal file
12
Task/Special-variables/Common-Lisp/special-variables.lisp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(defun special-variables ()
|
||||
(flet ((special-var-p (s)
|
||||
(and (char= (aref s 0) #\*)
|
||||
(find-if-not (lambda (x) (char= x #\*)) s)
|
||||
(char= (aref s (1- (length s))) #\*))))
|
||||
(let ((lst '()))
|
||||
(do-symbols (s (find-package 'cl))
|
||||
(when (special-var-p (symbol-name s))
|
||||
(push s lst)))
|
||||
lst)))
|
||||
|
||||
(format t "~a~%" (sort (special-variables) #'string<))
|
||||
1
Task/Special-variables/Julia/special-variables.julia
Normal file
1
Task/Special-variables/Julia/special-variables.julia
Normal file
|
|
@ -0,0 +1 @@
|
|||
join(sort(filter(sym -> let n=eval(sym); !(isa(n, Function) || isa(n, Type) || isa(n, Module)); end, names(Base))), ", ")
|
||||
1
Task/Special-variables/Lua/special-variables.lua
Normal file
1
Task/Special-variables/Lua/special-variables.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
for n in pairs(_G) do print(n) end
|
||||
29
Task/Special-variables/REXX/special-variables-1.rexx
Normal file
29
Task/Special-variables/REXX/special-variables-1.rexx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*REXX program demonstrates REXX special variables: RC, RESULT, SIGL */
|
||||
/*line two. */
|
||||
/*line three.*/ say copies('═',79)
|
||||
rc=1/3 /*line four. */
|
||||
signal youWho /*line five. */
|
||||
myLoo='this got skipped' /*line six. */
|
||||
youwho: /*line seven.*/
|
||||
sep=copies('─', 9) /*line eight.*/
|
||||
say sep 'SIGL=' sigl /*line nine. */
|
||||
say sep 'REXX source statement' SIGL '=' sourceline(sigl)
|
||||
say copies('═',79)
|
||||
g=44
|
||||
call halve g
|
||||
say sep 'rc=' rc
|
||||
say sep 'result=' result
|
||||
say copies('═',79)
|
||||
h=66
|
||||
hh=halve(h)
|
||||
say sep 'rc=' rc
|
||||
say sep 'result=' result
|
||||
say sep 'hh=' hh
|
||||
say copies('═',79)
|
||||
'DIR /ad /b' /*display the directories (Bare).*/
|
||||
say sep 'rc=' rc
|
||||
say sep 'result=' result
|
||||
say copies('═',79)
|
||||
exit /*stick a fork in it, we're done.*/
|
||||
/*──────────────────────────────────HALVE subroutine────────────────────*/
|
||||
halve: return arg(1) / 2 /*a simple halving function. */
|
||||
23
Task/Special-variables/REXX/special-variables-2.rexx
Normal file
23
Task/Special-variables/REXX/special-variables-2.rexx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'dir a2.txt'
|
||||
Say 'rc='rc
|
||||
'dir 33.*'
|
||||
Say 'rc='rc
|
||||
|
||||
Call square 5
|
||||
Say 'RESULT='result
|
||||
Say 'SIGL='sigl
|
||||
|
||||
x2=square(3) /* just a simle example */
|
||||
Say '3**2='||x2
|
||||
|
||||
Signal On Novalue
|
||||
x=y /* y was not yet assigned a value */
|
||||
|
||||
Exit
|
||||
square: Procedure Expose sigl
|
||||
Say 'square was invoked from line' sigl':' sourceline(sigl)
|
||||
Return arg(1)**2
|
||||
|
||||
Novalue:
|
||||
Say 'NOVALUE encountered in line' sigl':' sourceline(sigl)
|
||||
Exit
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/*REXX program to demonstrate REXX special variables: RC, RESULT, SIGL. */
|
||||
/*line two. */
|
||||
/*line three.*/ say copies('=',75)
|
||||
rc=1/3 /*line four. */
|
||||
signal youWho /*line five. */
|
||||
myLoo='this got skipped' /*line six. */
|
||||
youwho: /*line seven.*/
|
||||
say 'SIGL=' sigl
|
||||
say 'REXX source statement' SIGL '=' sourceline(sigl)
|
||||
say copies('=',75)
|
||||
g=44
|
||||
call someFunc g
|
||||
say 'rc=' rc
|
||||
say 'result=' result
|
||||
say copies('=',75)
|
||||
h=66
|
||||
hh=someFunc(h)
|
||||
say 'rc=' rc
|
||||
say 'result=' result
|
||||
say 'hh=' hh
|
||||
say copies('=',75)
|
||||
'DIR C:\ /ad | find /i /v "Volume " '
|
||||
say 'rc=' rc
|
||||
say 'result=' result
|
||||
say copies('=',75)
|
||||
exit /*stick a fork in it, we're done.*/
|
||||
/*───────────────────────────────────someFunc subroutine.───────────────*/
|
||||
someFunc: procedure; parse arg x; return x/2
|
||||
1
Task/Special-variables/Tcl/special-variables-1.tcl
Normal file
1
Task/Special-variables/Tcl/special-variables-1.tcl
Normal file
|
|
@ -0,0 +1 @@
|
|||
__DATE__, __DEBUG__, __FILE__, __LINE__, __NAME__, __TIME__
|
||||
Loading…
Add table
Add a link
Reference in a new issue