forked from xxq250/Nasal-Interpreter
add native function: srand, values, find.
This commit is contained in:
@@ -166,4 +166,13 @@ print(
|
||||
isvec([]),' ',isvec("[]"),'\n',
|
||||
vecindex([0,1,2,3,4],1),'\n',
|
||||
vecindex(["apple","banana"],"apple")!=nil,'\n'
|
||||
);
|
||||
);
|
||||
|
||||
println(values({
|
||||
a:1,
|
||||
b:2,
|
||||
c:3
|
||||
}));
|
||||
println(find("cd", "abcdef")); # prints 2
|
||||
println(find("x", "abcdef")); # prints -1
|
||||
println(find("cd", "abcdef")); # prints 2
|
||||
Reference in New Issue
Block a user