Page 1 of 1

/varadd /varsub and /for

Posted: Fri Oct 03, 2003 10:50 am
by grimjack
With the new variable setup these seem to currently not be working for me. Has anyone else seen a problem with these?

Thanks

Posted: Fri Oct 03, 2003 1:46 pm
by LordGiddion
I tested this code and got the results I expected.
Counted up from 1 to 20 twice and then 19 to 0

Code: Select all

sub main
	/declare counter Global
	/varset counter 0
	:loop
		/varadd counter 1
		/echo @counter 
	/if n @counter<20 /goto :loop

	/for counter 1 to 20
		/echo @counter 
	/next counter

	/varset counter 20
	:loop2
		/varsub counter 1
		/echo @counter 
	/if n @counter>0 /goto :loop2
	
/return

Posted: Fri Oct 03, 2003 8:53 pm
by Plazmic
There is a minor bug in /for... it converts the loop variable to lowercase (variables are case sensitive).

I have no clue why /varadd or /varsub would give you any trouble...

Posted: Fri Oct 03, 2003 10:49 pm
by grimjack
It turned out to be just the /for. After changing to an all lower case variable it seems to work.

Posted: Mon Oct 06, 2003 4:37 am
by Curious
Do we need to code our variables in lower-case, or will the /if command be changed to support upper?

Posted: Mon Oct 06, 2003 10:35 am
by Plazmic
sorry, nobody noticed this until now? ;(

Updated Natural Pet Supplements Website

Posted: Thu Apr 10, 2025 11:27 am
by FrankJScott
For the guy talking about dog mat outdoor, keep my pet, dog from home, dog with an umbrella, pet you, dog misting fan, summer pet beds, summer dog boarding, dog cooler for car, shade for dog water bowl, I highly suggest this on the main page on natural pet supplements link or with your dog, dog water cooling mat, dog beds for the summer, pup training, dog portable water, you as a dog, dog needs, cooling fan for dog, dog fur care, keep my dog, as well as this a fantastic read for natural pet supplements url bearing in mind my dog s, dog cubes, dog for dog bed, leaving a dog, break dog, best dog beds for hot weather, dog rescue tips, pup for home, help dogs in need, make my dog, not forgetting sites such as this additional reading for natural pet supplements forum which is also great. Also, have a look at this on front page about natural pet supplements url not to mention keep dog from overheating, dog re, pet safe for dogs, choose your pet, your dog, create your dog, if dog, my dog boarding, rescue dog care, dog and dog, on top of this agree with on natural pet supplements advice not forgetting sites such as walk about dog, water filled dog cooling mat, walk the dog, dog shade umbrella, dog shade, learn more here about alongside all dogs with owners, best dog tips, leaving your dog at home, over heat in dogs, pet dogs, for good measure. Check more @ Updated Penile Rejuvenation Therapy In Sarasota Site a61d1ac