mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-21 10:28:50 +08:00
bug fixed & add systime, finished vecindex
This commit is contained in:
+18
-1
@@ -149,4 +149,21 @@ f1() or f2();
|
||||
# print '1'
|
||||
# this means that when using 'or' or 'and',
|
||||
# if the result is clear when calculating,
|
||||
# objects behind will not be calculated
|
||||
# objects behind will not be calculated
|
||||
|
||||
print(
|
||||
subvec([0,1,2,3],2),'\n',
|
||||
subvec([0,1,2,3],2,1),'\n',
|
||||
abs(1),'\n',
|
||||
abs(-1),'\n',
|
||||
systime(),'\n',
|
||||
isfunc(func{}),' ',isfunc([]),'\n',
|
||||
ishash({}),' ',ishash([]),'\n',
|
||||
isint(114.514),' ',isint(114514),'\n',
|
||||
isnum("0xaa55"),' ',isnum("?"),'\n',
|
||||
isscalar(0.618),' ',isscalar("hello"),' ',isscalar([]),'\n',
|
||||
isstr("hello"),' ',isstr(func{}),'\n',
|
||||
isvec([]),' ',isvec("[]"),'\n',
|
||||
vecindex([0,1,2,3,4],1),'\n',
|
||||
vecindex(["apple","banana"],"apple")!=nil,'\n'
|
||||
);
|
||||
Reference in New Issue
Block a user