Alice Community

Alice Community (
-   How do I...? (
-   -   Combine two Strings and Say it as whole (

Stipz 08-03-2009 09:17 AM

Combine two Strings and Say it as whole
1 Attachment(s)
We have an exercise in using arrays and numbers to strings

now I'm having troubles on how the character will say the worded number

if it is in 23 -[Twenty][One], 33 -[Thirty][Three]

999- [Nine Thousand][Nine Hundred][Ninety][Five]

i've attached the a2w file just in case

tips, comments are very much appreciated :D

Veryuhbull 08-03-2009 11:44 AM

Well by looking at this you would have to make a scenario for every number. The variables you are using also aren't helping to simplify this project. You should use 0-9, 10-19,(for the special name numbers) Multiples of ten, and multiples of hundreds. If you could isolate the individual places it would cut a ton programing but the interface does not work that way as it.

I worked on yours for a while and thing it would be easier for me to help you by starting over. I will see if I can make a better set-up.

Stipz 08-03-2009 05:30 PM

I've noticed that my program lacks this modulus logic
(this can replace the if-else statements)

can someone please enlighten me on this one

having this searched on the web, it still confuses me

Stipz 08-17-2009 10:00 PM

1 Attachment(s)
im really stuck with this program

for some reason alice is automatically rounding off results of remainders
and getting negative answers that are required for the sorting

here's the version 3

the ranger.say has not been included yet
observe how the variables change when you input something like:
9900, 1100, 2300 (anything that has hundreds place)

All times are GMT -5. The time now is 06:32 AM.

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