Mistium / Origin-OS

originOS is a scratch desktop gui made by @Mistium
https://origin.mistium.com
24 stars 9 forks source link

[NEW OSL] Local Variables to scopes such as def and method #132

Closed Mistium closed 2 weeks ago

Mistium commented 1 month ago
def "hello"
  local test_val = "hello world"
  error test_val
  // console.error(test_val)
endef

hello

log test_val
// logs "test_val" because test_val is undefined
Mistium commented 2 weeks ago

https://github.com/Mistium/Origin-OS/wiki/OSL-%E2%80%90-Subroutines

done using a variable this in a similar way to javascript