gosukiwi / Blueberry

A beautiful programming language with clean syntax which compiles to PHP
MIT License
63 stars 10 forks source link

global? #31

Closed storypixel closed 9 years ago

storypixel commented 9 years ago

Can you give an example of how to declare a global variable via Blueberry? I've tried some things, they aren't working.

gosukiwi commented 9 years ago

Try _GLOBALS["MyGlobal"] = "some value". Right now there's not an easier way. I think the global keyword might be necessary to work with legacy scripts.

storypixel commented 9 years ago

Works perfectly, thank you