Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,26 @@
(version)
→ EchoLisp - 2.50.3
📗 local-db: db.version: 3
(when (< (version) 2.6)
(writeln "Please reload EchoLisp : CTRL-F5, CMD-R or other...")
(exit))
(if (and (bound? 'bloop) (bound? 'abs) (procedure? abs))
(abs bloop) 'NOT-HERE)
→ NOT-HERE
(define bloop -777)
→ bloop
(if (and (bound? 'bloop) (bound? 'abs) (procedure? abs)) (abs bloop) 'NOT-HERE)
→ 777
(for/sum ((kv (environment-bindings user-initial-environment )))
#:when (integer? (second kv))
(writeln kv)
(second kv))
("bloop" -777)
("gee" 555)
("buzz" 333)
→ 111 ;; sum

View file

@ -0,0 +1,5 @@
var(bloob = -26)
decimal(lasso_version(-lassoversion)) < 9.2 ? abort
var_defined('bloob') and $bloob -> isa(::integer) and lasso_tagexists('math_abs') ? math_abs($bloob)

View file

@ -0,0 +1,15 @@
var(
bloob = -26,
positive = 450
)
local(total = integer)
with v in var_keys
// Lasso creates a number of thread variables that all start with an underscore. We don't want those
where not(string(#v) -> beginswith('_')) and var(#v) -> isa(::integer)
do {
#total += var(#v)
}
#total

View file

@ -0,0 +1,5 @@
put _player.productVersion
-- "11.5.9"
_player.itemDelimiter="."
if integer(_player.productVersion.item[1])<11 then _player.quit()

View file

@ -0,0 +1,6 @@
-- check existance of bloop in local scope
bloopExists = not voidP(value("bloop"))
-- or for global scope:
-- bloopExists = not voidP(_global.bloop)
absExists = value("abs(1)")=1
if bloopExists and absExists then put abs(bloop) -- or abs(_global.bloop)

View file

@ -0,0 +1,10 @@
cnt = 0
sum = 0
repeat with v in the globals
if integerP(v) then
cnt = cnt + 1
sum = sum + v
end if
end repeat
put cnt
put sum

View file

@ -0,0 +1,6 @@
echo NimVersion
var bloop = -12
when compiles abs(bloop):
echo abs(bloop)

View file

@ -0,0 +1,12 @@
: bloopAbs
| bl m |
System.VERSION println
Word find("bloop") ->bl
bl isA(Constant) ifFalse: [ "bloop constant does not exist" println return ]
"abs" asMethod ->m
m ifNull: [ "abs method does not exist" println return ]
System.Out "bloop value is : " << bl value << cr
System.Out "bloop abs is : " << bl value m perform << cr ;