Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / [noob] How to escape characters?

Author
Message
Kim Possible
19
Years of Service
User Offline
Joined: 13th Aug 2005
Location: Where ever there\'s trouble.
Posted: 15th Aug 2005 04:16
Hi All,

I'm still waiting for my DL of DBPro to be authorized, so I'm light on documentation.

How do I escape a character to print? For example, the double-quote (")

In many languages, I'd be using \ - so [pseudocode] print "\"" would do it.

Thoughts?

DBP + VC Ent.Studio | Maya, MAX, Soft3D, MilkShape, Character FX | 3.0Ghz P4, IC7G, GF 6800GT (primary) / 3200XP, A7N8x, GF 6600GT (secondary) / 6x dual 2.8Ghz Xeon SuperMicro (renderfarm)
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 15th Aug 2005 05:17
i don't believe darkbasicpro has an escape character that im aware of. But you could use the character function to print it out. Chr(ascii#)

"Dark Basic rocks! Although the things you can do are not as dynamic as C++, just think how long it would take to do the same thing! I can get FPS of over 60!"
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Aug 2005 05:17 Edited at: 15th Aug 2005 05:18
Use Chr$(34).

Eg:

Print "The man said ";chr$(34);"Go Away!";chr$(34)

[Edit]

Sorry Leys - we were replying at the same time!

TDK_Man

Kim Possible
19
Years of Service
User Offline
Joined: 13th Aug 2005
Location: Where ever there\'s trouble.
Posted: 15th Aug 2005 05:31
Thanks for the help, Leys and TDK!

That's kinda inconvenient, but I'll live with it.

DBP + VC Ent.Studio | Maya, MAX, Soft3D, MilkShape, Character FX | 3.0Ghz P4, IC7G, GF 6800GT (primary) / 3200XP, A7N8x, GF 6600GT (secondary) / 6x dual 2.8Ghz Xeon SuperMicro (renderfarm)
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Aug 2005 08:53
Isn't there a bug that lets you do it without using chr$(34)?

I don't recommend using it though... once the bug is fixed you get to redo all your code.



Here's a function to check each character in a text string.

Hope this helps.

Kim Possible
19
Years of Service
User Offline
Joined: 13th Aug 2005
Location: Where ever there\'s trouble.
Posted: 15th Aug 2005 09:04
Sorry for the delays - I've got a bunch of posts out there that haven't been approved yet, and they're going to look kinda silly being so far out of context. . .

---

That's a cute hack, Grog! Thx!

And I'll certainly avoid the """" - that's just fugly!

DBP + VC Ent.Studio | Maya, MAX, Soft3D, MilkShape, Character FX | 3.0Ghz P4, IC7G, GF 6800GT (primary) / 3200XP, A7N8x, GF 6600GT (secondary) / 6x dual 2.8Ghz Xeon SuperMicro (renderfarm)

Login to post a reply

Server time is: 2024-11-27 20:39:23
Your offset time is: 2024-11-27 20:39:23