Repeat question

zryip theSlug zryip.theslug at
Tue May 4 14:38:07 EDT 2010

2010/5/4 Steve Jones <stevejones at>:
> An area I never mastered with SuperCard and still have trouble with in RR is using the repeat control structure...
> I want to check every field on a card before it closes to be sure none are EMPTY.
> I know the structure would be
> REPEAT for the number of fields on the card
>   if field 1 is empty
>      put up an alert
>   else
>      go to next field
>   end if
> end repeat
> or something similar.
> How do I refer to the fields?  Their IDs aren't sequential and there names aren't "numbered".

Hello Steve,

To check every field on your card you can do that :

repeat with i = 1 to the number of fields on this card
   if (field i is empty) then...

end repeat

Where i is a variable containing the number of your field.

-Zryip TheSlug- wish you the best! 8)

More information about the Use-livecode mailing list