Jump to content
Sign in to follow this  
ZootZootZootie

List Support

Recommended Posts

ZootZootZootie

I haven't had much programming knowledge since pascal so I'm not sure if this is even supported or intelligent to do but what the.. might as well try.

I'm trying to do a check but it has 72 possible combinations.

Is it possible to do a do loop with the until command being

Until ($x, {$a,$b....}) = {$z,$y...}

or do I have to type out each combination?

thanks for the help.

Share this post


Link to post
Share on other sites
Jos

Would this be a workable solution ??

Do
  ; Do your thing until Check() returns  1
until check()


Func Check()
   Local $Wanna_stop

  ; DO your testing with for...next loops/If's /Select case or something
  ; and set $Wanna_stop to 1 when you want to stop the Do..Until 

   Return ($Wanna_stop)
EndFunc

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
trids

You might also want to try the following workaround (for the missing In() function which I'm hoping is still on a todo list somewhere :whistle: ) ..

;If $nValue In (2,3,5,7,11,13,17,19)
    If StringInStr(":2:3:5:7:9:11:17:19:", ":" & String($nValue) & ":") Then
       ;Prime < 20
    EndIf

HTH B)

Share this post


Link to post
Share on other sites
GrahamS

You might also want to try the following workaround (for the missing In() function which I'm hoping is still on a todo list somewhere  :whistle: ) ..

;If $nValue In (2,3,5,7,11,13,17,19)
    If StringInStr(":2:3:5:7:9:11:17:19:", ":" & String($nValue) & ":") Then
      ;Prime < 20
    EndIf

HTH  :angry:

So, 9 is prime these days, is it? B)

GrahamS

Share this post


Link to post
Share on other sites
GrahamS

Is it possible to do a do loop with the until command being

Until ($x, {$a,$b....}) = {$z,$y...}

or do I have to type out each combination?

Not quite sure what the tests you want to do are. Could you elaborate a bit more?

Your example syntax is not valid. I assume that you want a better answer than

do
until $x or $a=$z or $b=$y

GrahamS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×