Yes, this worked fine....things are certainly looking good here
now - thanks for all the help!!



At 03:11 PM 10/27/99 +0100, you wrote:
>Is there a simple way to nest loops.....the if statment is limited to all
or
>nothing.....the either statement
>has two possible outcomes.

Is this what you're looking for?

>> ? switch
Selects a choice and evaluates what follows it.
Arguments:
    value -- Value to search for.
    cases -- Block of cases to search. (block)
Refinements:
    /default
        case -- Default case if no others are found.
---
>
>I am trying this without success
>
>foreach [name description type] Fields         [
>
>       FormType: type
>               if FormType = TEXT [print "TEXT"]
>               if FormType = TEXTAREA [print "TextArea"]
>                                                               ]
>
>and being told
>
>TEXT
>** Script Error: TEXTAREA has no value.
>** Where: if FormType = TEXTAREA [print "TextArea"]

TEXT and TEXTAREA are words with no value assigned.  Perhaps you mean to use
"TEXT" and "TEXTAREA", the literals with those values?  Of course, this
depends on what type? 'type is in 'Fields.  The 'if test must match types.

>
>It would appear that the FormType variable is being cleared???
>
>Francois
>

As always in debugging, try adding a few print statements to test your
hypotheses and get to the meat of what's happening.  Just add

print FormType

somewhere in your 'foreach block, and see for yourself.

Reply via email to