Author |
Message |
cool
|
Posted: Sun May 15, 2005 4:10 pm Post subject: error trap : "THE QUOTATION" |
|
|
how do u error trap this input:
" |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Notoroge
|
Posted: Sun May 15, 2005 4:16 pm Post subject: (No subject) |
|
|
Huh?
Update: I'll assume you're talking about the ' " '. As far as I know, there's no need to error trap quotation marks when getting it from a user's input. Only when out-putting hard-coded text. And in that case, you can go:
code: | put '"Hello," said Mr. Timothy' |
|
|
|
|
|
|
MysticVegeta
|
Posted: Sun May 15, 2005 4:32 pm Post subject: (No subject) |
|
|
uhhh actually
code: | put "'Hello,' said Mr. Timothy"
|
|
|
|
|
|
|
Notoroge
|
Posted: Sun May 15, 2005 4:34 pm Post subject: (No subject) |
|
|
I know that. I just tested it in 4.0.5 and apperantly what I posted doesn't work. But in the old 4.0.x it was perfectly possible to post standard *"* in the middle of the sentence using my method.
Update: Or maybe it was 3.11? Bah, who knows. |
|
|
|
|
|
cool
|
Posted: Sun May 15, 2005 4:42 pm Post subject: (No subject) |
|
|
yo
when the program asks for an input, and the user types in just a quotation:
"
then the program freezes, and the error message is:
No terminating quote for quoted string |
|
|
|
|
|
Notoroge
|
Posted: Sun May 15, 2005 4:44 pm Post subject: (No subject) |
|
|
code: | var asdf : string
get asdf : *
put asdf
| Works for me. |
|
|
|
|
|
Cervantes
|
Posted: Sun May 15, 2005 4:45 pm Post subject: (No subject) |
|
|
If you've got a string of unnacceptable inputs and you're indexing to see if the user's input is in there, you can use \"
The \ basically says that the next character is what it is and doesn't do anything special. So doing \" actually puts the " there, instead of ending the string. Or if you're linking to a file, using \\ actually says use the \, as opposed to making the next character what it is.
In any case, you need to be more specific in your question. I still don't know what you mean.
EDIT: Aah, thanks for the clarification cool. I see what you mean now. It seems the get : * works fine. |
|
|
|
|
|
Notoroge
|
Posted: Sun May 15, 2005 4:47 pm Post subject: (No subject) |
|
|
Cervantes wrote: Or if you're linking to a file, using \\ actually says use the \, Or you can just use a "/" for that.
Update: Oops, wrong key. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|