Posted 20 June 2016 - 02:29 PM
Ohi thar!
I've kind of had an idea so I can prevent coding noise and repeatedly typing the same bloody thing over and over, so here's my question with something I found I was doing a lot; can something like this be done:
Now with my somewhat flunky logic here, I am expecting an outcome to be something like an output like "Herp." being printed before "Derp." is printed 'cause it's looking for the print function to be called. Is there a way to do this? I'm wanting to apply this kind of logic to a sleep function so when printing a lot of text on the screen, it doesn't just simply flash across the screen in 0.5/^8 seconds. Instead of having to write "sleep(0.5)" when I print something out, I could just simply have it as a "make shift" condition applying to the print function. Anyone get what I'm layin' down here or is there another way of doing this?
Tried googling but couldn't get the right search terms if something like this is already out there, so as far as I know nothing seems to be covering this.
I've kind of had an idea so I can prevent coding noise and repeatedly typing the same bloody thing over and over, so here's my question with something I found I was doing a lot; can something like this be done:
while text in print() do
write("Herp.\n")
end
print("Derp.")
Now with my somewhat flunky logic here, I am expecting an outcome to be something like an output like "Herp." being printed before "Derp." is printed 'cause it's looking for the print function to be called. Is there a way to do this? I'm wanting to apply this kind of logic to a sleep function so when printing a lot of text on the screen, it doesn't just simply flash across the screen in 0.5/^8 seconds. Instead of having to write "sleep(0.5)" when I print something out, I could just simply have it as a "make shift" condition applying to the print function. Anyone get what I'm layin' down here or is there another way of doing this?
Tried googling but couldn't get the right search terms if something like this is already out there, so as far as I know nothing seems to be covering this.
Edited on 20 June 2016 - 12:39 PM