B2C supports a host of math Operations. The ordinary operations exist (+, -, *, /,MOD) with which you can do math calculations. The Order of Operations applies (multiplication and division first, then addition and subtraction) and parentheses are used to change the order of operations. (a=(a+b)*c).
B2C currently supports only integer arithmetic.
dim a as int a = 5 + 1 print "the answer is ", a > the answer is 6
Random Numbers
Random numbers are numbers whose value is unpredictable. You can get a random number with the Rnd() function:
Rnd(x)
Where 'x' is any number. Rnd(x) will return a number from 0 to 'x' inclusive.
x=rnd(5)+1 'return a number from 1 to 6, like a 6-sided die
file: /Techref/cybiko/b2c/ch13.htm, 1KB, , updated: 2008/6/13 15:51, local time: 2024/11/19 12:42,
18.224.53.19:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/Techref/cybiko/b2c/ch13.htm"> cybiko b2c ch13</A> |
Did you find what you needed? |