If->Then Syntax

ben robinson baltimore.ben at gmail.com
Fri Dec 21 15:14:05 UTC 2007


don't use if...then...
use select case.

Select Case ListName
   Case 1,3,5,7,9
      do something
   Case 2,4,6,8
      do something else
End Select

hope that helps.

ben robinson

On Dec 21, 2007 10:04 AM, Steve Frost <frosts at haskins.yale.edu> wrote:

>
> Sorry, but I cannot find the syntax for this:
> I am reading in a series of lists and I need certain variables set
> differently depending on the list.
> I need the correct syntax for something like the following:
>
> If thelist = [1 3 5 7 9] Then
>  do something
> Else
>  do something else
> End If
>
> I have made a work-around using a series of OR statements (i.e., If
> thelist = 1 or thelist = 3 or thelist = 7 or thelist = 9 then...) but
> this is silly. Can anybody help me with the proper syntax? Thanks
>
> Steve
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20071221/4f6a6ef4/attachment.htm>


More information about the Eprime mailing list