lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi, all,

I'm playing with v. 5.2's goto function but have not come up with a
compact method to test for the existence of a particular label in the
script without terminating the script if the label does not exist. In
pseudo-code I'm looking for something like:

if label exists then
  ... do something ...
else
  ... do something else ...
end

The problem being that input may or may not match a label's text. I'm
hoping to avoid duplicating each label's text in a table to test for
existence before branching the script.

Any ideas?

Best regards,

Paul