OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: WolfgangGutke on March 25, 2009, 05:20:52 AM

Title: dcl_Messagebox
Post by: WolfgangGutke on March 25, 2009, 05:20:52 AM
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
Title: Re: dcl_Messagebox
Post by: owenwengerd on March 25, 2009, 10:39:15 AM
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"
Title: Re: dcl_Messagebox
Post by: WolfgangGutke on March 25, 2009, 11:04:37 AM
Many thanks!

The only chance is (VL-PRINC-TO-STRING "FM-B8FB4EA26B3B\000") -> "FM-B8FB4EA26B3B" !
(text comes from an microsoft-access-ldb file)
Title: Re: dcl_Messagebox
Post by: owenwengerd on March 25, 2009, 11:25:56 AM
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.