Skip to content

Instantly share code, notes, and snippets.

@lepinekong
Created December 27, 2017 09:35
Show Gist options
  • Save lepinekong/f543b7104adb1f328281b5db25cb2393 to your computer and use it in GitHub Desktop.
Save lepinekong/f543b7104adb1f328281b5db25cb2393 to your computer and use it in GitHub Desktop.
static variable in Red
static-function: function[ /local static-var][
static-var: []
; initialization
if empty? static-var [
append static-var 0
]
; cum
static-var/1: static-var/1 + 1
print static-var/1
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment