Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How do I remove the decimal (.0) (http://www.alice.org/community/showthread.php?t=11550)

chellydee 08-06-2016 09:28 PM

How do I remove the decimal (.0)
 
I'm working on an assignment, in which I have to make an Alice character say an integer, but also include a statement in the method that will decrement the integer with each loop. I have both a variable with the starting number value and a variable to say the number as a string. However, my character says the number as "100.0" vs "100".....
how do I fix this issue?
:confused:

RavenOfCode 08-06-2016 09:57 PM

Just toss in a world.int function onto the variable you want to display.

chellydee 08-06-2016 10:31 PM

[QUOTE=RavenOfCode;57261]Just toss in a world.int function onto the variable you want to display.[/QUOTE]

Thanks a bunch....that worked out exactly how I needed it to!:D


All times are GMT -5. The time now is 10:00 AM.

Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.