Computer Science Canada

Huh?

Author:  TheXploder [ Sun Jan 16, 2005 4:17 pm ]
Post subject:  Huh?

I got a question is there any good way to use this I mean if you write;
put phrase (i) = " "
it outputs true if there is a " " and false when there isn't now how could I use that. To bad you can't do something like: if phrase (i) = " " //action
that all on one line.

code:

var phrase : string
get phrase:*

for i : 1 .. length (phrase)
    put phrase (i) = " "
end for

Author:  Bacchus [ Sun Jan 16, 2005 4:47 pm ]
Post subject: 

couldnt you just do an if?
like: arnt
put phrase(i)=" "
and
if plrase(i)=" "
the same, and then you can accually put something in the if

Author:  TheXploder [ Sun Jan 16, 2005 4:53 pm ]
Post subject: 

well the point is that I don't what to do the whole if structure;
that way I'd save a lot more space.

Author:  Bacchus [ Sun Jan 16, 2005 5:24 pm ]
Post subject: 

well then im not sure if u can, y not make a function to do it for you then


: