Jump to content

List Support


Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...