dcl_Messagebox

Started by WolfgangGutke, March 25, 2009, 05:20:52 AM

Previous topic - Next topic

WolfgangGutke

Hello,
how I agree from the string "FM-B8FB4EA26B3B\000" "\" out (with vl-string ... it does not go!)??

Reason:
If I hand over a string to the message box which the string "\000" contain, the remaining string will not hand over after "\000" to the message box.

Example:
(dcl_Messagebox "Here is my\000 dialog" "Hello World" 2 3)
(dcl_Messagebox "Here is my dialog" "Hello World" 2 3)

Thank you
Wolfgang Gutke

owenwengerd

In AutoLISP, the string "\000" is a hard-coded NULL character, which acts as a string terminator.  If you want a backslash character in a literal string, you must escape it, like so:
"FM-B8FB4EA26B3B\\000"

WolfgangGutke

Many thanks!

The only chance is (VL-PRINC-TO-STRING "FM-B8FB4EA26B3B\000") -> "FM-B8FB4EA26B3B" !
(text comes from an microsoft-access-ldb file)

owenwengerd

If the database contains strings with embedded null characters, you'll have to preprocess the strings before using them, either by replacing null characters with something else, or splitting the data into multiple strings.