Hi Francois,

I think you maybe misinterpreting this error message.

What it is saying is that TEXTAREA has no value, not FormType.
Is the word TEXTAREA being assigned a value anywhere ?
or are you trying to test if formtype = "TEXTAREA" ?

As for the question about nesting. There another nesting structure in REBOL
that might better suit your needs. Look up the 'Switch function.

Cheers,

Allen K



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 28, 1999 12:11 AM
Subject: [REBOL] nested loops

> Is there a simple way to nest loops.....the if statment is limited to all or
> nothing.....the either statement
> has two possible outcomes.

>
> 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"]
>
> It would appear that the FormType variable is being cleared???
>
> Francois
>
>








Reply via email to