common code patterns

Devin Asay devin_asay at
Thu Aug 10 20:53:58 EDT 2017

I’d like to see one like this for conditional structures:

if <condition> then
  -- do if true
  -- do if false
end if

I always try to use the “full” form of if-then-else. It solves lots of confusion when you end up with nested if-thens. I teach my students to do it this way as best practice, and I think it reinforces the idea of a completely formed and terminated structure.


> On Aug 10, 2017, at 6:42 PM, Monte Goulding via use-livecode <use-livecode at> wrote:
> Over on the Parent of Target thread we are discussing local var access so I wonder if this is a useful common pattern:
> local s<Something>
> command set<Something> p<Something>
>   put p<Something> into s<Something>
> end set<Something>
> function get<Something>
>   return s<Something>
> end get<Something>
> Cheers
> Monte
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Devin Asay
Learn to code with LiveCode University

More information about the Use-livecode mailing list