implementing string indexes

This commit is contained in:
2024-08-31 22:07:12 +02:00
parent b839d67cea
commit 0bc5f495b9
6 changed files with 73 additions and 0 deletions

3
samples/indices.lox Normal file
View File

@ -0,0 +1,3 @@
var alphabet = "abcdefghijklmnopqrstuvwxyz"; var X = alphabet; print "hello " + X[3] + X[0] + X[10];
var s = " "; s[0] = "d"; s[1] = "a"; s[2] = "k"; var hey = "hello " + s + "!"; print hey;