Finished slice and dot notation, needs a lot of testing

This commit is contained in:
2022-09-06 06:46:00 +01:00
parent 304e1a5fb0
commit b8f20add66
8 changed files with 791 additions and 50 deletions

View File

@@ -1,8 +1,23 @@
var week = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
week[::-2] = ["first", "second", "third"];
print week;
var str = "0123456789";
str[3:5:-2] = "abc";
print str;
str = "Hello world";
print str; //Hello world
print str[::2]; //Hlowrd
print str[::-2]; //drwolH
{
fn f() {
return i;
}
}