cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

For loop in a while loop

Resolvido!
Ir para a solução

@altenbach wrote:

Since a FOR loop that iterates zero times basically does not do anything new, here's another silly solution; 🙂

 

altenbach_0-1648657964744.png

 

(Also, there is a +1 primitive that you don't even need if you would adjust the random range accordingly. "x+y" is not a useful label, there needs to be a way to stop the while loop. The while loop probably also needs some timing, etc.)

 

I agree that we would need significantly more context to find a good solution to whatever the OP is trying to

do. e.g. by looking at the real code and not some stripped down example.

 

  • Is the while loop a toplevel while loop?
  • What is the purpose of the FOR loop?
  • How does it relate to the overall user experience when running the program?
  • ...

 


I missed the simplified vi (I think it came in while I was typing a reply), but I agree that it leaves too much context out to understand the real application.

0 Kudos
Mensagem 11 de 14
1.097Exibições

And if you don't like red (coercion dots) and green (booleans), one could do as follows: (still silly!!!)

 

altenbach_0-1648659772779.png

Or even ...

 

altenbach_0-1648659972555.png

 

0 Kudos
Mensagem 12 de 14
1.091Exibições

What I'm not understanding is the Poly instance.   Am I really missing something?  Isn't there a U8 instance?


"Should be" isn't "Is" -Jay
0 Kudos
Mensagem 13 de 14
1.084Exibições

@JÞB wrote:

Isn't there a U8 instance?


No, only U64, I64, and DBL.

 

(Also note that there are bugs!)

 

Ideally, this should be a VIM where the output adapts to the input representation of the lower and upper limit. 😄

Mensagem 14 de 14
1.077Exibições