Those math statements
Moderator: Moderators
Those math statements
I forgot what they were called, but I learned them in elementary school. Whats the name of those statements that come out like this?
100,000 + 20,000 + 5 = 120,005
Is there a way to do that in mohaa? Like if I had an 8 and a 4, could I add it so it makes 84?
100,000 + 20,000 + 5 = 120,005
Is there a way to do that in mohaa? Like if I had an 8 and a 4, could I add it so it makes 84?
- HappyChappy_7000
- Warrant Officer
- Posts: 146
- Joined: Thu Jul 10, 2003 1:14 pm
- Location: Australia
- Contact:
to all concerned....
just in case someone is wondering what the heck the "int" function does...
It interprets whatever is enclosed in double quotations as alpha numerical
strings and then converts the characters representing integer numbers into
a integer form.
So......using jv_maps example......
int("8" + "4") = 84
the int function evaluates the alphanumeric character "8" as a integer numeric 8 and the alphanumeric character "4" as being an integer 4 THEN
concatonates (joins them together in a string) then CONVERTS THE STRING INTO IT'S integer form.
As to Alcoholic's question....what is the name of the term for a sequence such as 100,000 + 20,000 + 5 = 120,005
I believe you would call it a Polynomial term. That is it contains more then two (binomial) sets of numbers on one side of the equal sign.
ex:
A +B = C would be a binomial as apposed to A (B*C) = D being more then two elements which would be of a polynomial form. And for those that have been away from math for some time. The above simple examples can be called an equation, because you are equating something on the left hand side of the equal sign to being equal to something on the righthand side of the equal sign.
cheers
It interprets whatever is enclosed in double quotations as alpha numerical
strings and then converts the characters representing integer numbers into
a integer form.
So......using jv_maps example......
int("8" + "4") = 84
the int function evaluates the alphanumeric character "8" as a integer numeric 8 and the alphanumeric character "4" as being an integer 4 THEN
concatonates (joins them together in a string) then CONVERTS THE STRING INTO IT'S integer form.
As to Alcoholic's question....what is the name of the term for a sequence such as 100,000 + 20,000 + 5 = 120,005
I believe you would call it a Polynomial term. That is it contains more then two (binomial) sets of numbers on one side of the equal sign.
ex:
A +B = C would be a binomial as apposed to A (B*C) = D being more then two elements which would be of a polynomial form. And for those that have been away from math for some time. The above simple examples can be called an equation, because you are equating something on the left hand side of the equal sign to being equal to something on the righthand side of the equal sign.
cheers
grb
-
TheShiznaeSpe
- Major
- Posts: 304
- Joined: Wed Feb 05, 2003 11:45 pm
- Location: US
- Contact:
Re: to all concerned....
and that's why i almost failed both algebra and geometrygrb wrote:just in case someone is wondering what the heck the "int" function does...
It interprets whatever is enclosed in double quotations as alpha numerical
strings and then converts the characters representing integer numbers into
a integer form.
So......using jv_maps example......
int("8" + "4") = 84
the int function evaluates the alphanumeric character "8" as a integer numeric 8 and the alphanumeric character "4" as being an integer 4 THEN
concatonates (joins them together in a string) then CONVERTS THE STRING INTO IT'S integer form.
As to Alcoholic's question....what is the name of the term for a sequence such as 100,000 + 20,000 + 5 = 120,005
I believe you would call it a Polynomial term. That is it contains more then two (binomial) sets of numbers on one side of the equal sign.
ex:
A +B = C would be a binomial as apposed to A (B*C) = D being more then two elements which would be of a polynomial form. And for those that have been away from math for some time. The above simple examples can be called an equation, because you are equating something on the left hand side of the equal sign to being equal to something on the righthand side of the equal sign.
cheers
Sorry for the verbosity....just trying to help.
I was only trying to explain to HappyChappy_7000, how the int() function works, since he indicated that he did not understand your reply. And also
provide a simple answer to Alcoholic to his question. Sorry if it appeared to be to lenghtly an answer. No respones required. And no ill feelings harbored in any way.
cheers
provide a simple answer to Alcoholic to his question. Sorry if it appeared to be to lenghtly an answer. No respones required. And no ill feelings harbored in any way.
cheers
grb
-
TheShiznaeSpe
- Major
- Posts: 304
- Joined: Wed Feb 05, 2003 11:45 pm
- Location: US
- Contact:
well while where at it....
Can Jv_Map or some other expert give a good example of where we would want to use the int() function in the manner it was used in the example in this thread? Not sure what use it would have in the context of the example, but then again, most of the time I'm not to bright.
I think I will check out some of the stock scr files to see where the int()
function may be used.
And TheShiznaeSpe..... I understood your comment to imply no negative.
I failed algebra many years ago before I started to get serious about obtaining some form of education.
cheers all
I think I will check out some of the stock scr files to see where the int()
function may be used.
And TheShiznaeSpe..... I understood your comment to imply no negative.
I failed algebra many years ago before I started to get serious about obtaining some form of education.
cheers all
grb
jv_map...
fair enough. Incidentally after a search thru ALL the PK0 global files for a string that contained "int(" to catch any int function call, I found not one.
So it appears that the folks who created the stock missions did not have a
need to use the function.
cheers
So it appears that the folks who created the stock missions did not have a
need to use the function.
cheers
grb
How about if you want to make a variable an integer like "20" instead of "20.000". So...
This will output something like "local.n = 10.000". How would you make it output "local.n = 10", basically getting rid of the decimal places? I've tried int (local.n), (int local.n) and variations of these, but they don't work. I read through all the docs I can find as well as through this index, but I haven't seen int used with variables. Any ideas?
Take it easy,
SysQuik
Code: Select all
main:
level.mynumber = 100
thread my_value
end
my_value:
local.n = (level.mynumber) * .1
println "local.n = " (local.n)
end
Take it easy,
SysQuik

