hi,
in the online help is stated:
String Concatenating
"For control characters, use the non-quoted hash sign and a numeral (e.g. #13 for CR)."
this is wrong:
use "+ Chr(13)" etc. instead.
error in online help: "#13" instead of "Chr(13)"
Re: error in online help: "#13" instead of "Chr(13)"
Hi,
Thank you for reporting this, we will fix it.
Regards,
Filip.
Thank you for reporting this, we will fix it.
Regards,
Filip.
Re: error in online help: "#13" instead of "Chr(13)"
I seem to be struggling here too.
I need a string that contains only the ascii value 13 (a CR)
so I dimension a string - say CR_str
then I try CR_str=chr(13)
but I get an 'incompatibe types' error.
Obviously I'm mis understanding the use of 'chr'.
It seems the type expected is a byte.
so if I dimension X1 as byte
x1=chr(13) compiles ok, leaving x1=13
interesting but not what I need, and it does seem to make 'chr' a rather useless instruction, x1=13 would be a little easier so I must be missing something.
So what am I doing wrong here?
What is the easiest way to get a string containing a control characters or a combination of printable and control characters?
I need a string that contains only the ascii value 13 (a CR)
so I dimension a string - say CR_str
then I try CR_str=chr(13)
but I get an 'incompatibe types' error.
Obviously I'm mis understanding the use of 'chr'.
It seems the type expected is a byte.
so if I dimension X1 as byte
x1=chr(13) compiles ok, leaving x1=13
interesting but not what I need, and it does seem to make 'chr' a rather useless instruction, x1=13 would be a little easier so I must be missing something.
So what am I doing wrong here?
What is the easiest way to get a string containing a control characters or a combination of printable and control characters?
Re: error in online help: "#13" instead of "Chr(13)"
Hi,
Regards,
Filip
Try the following code :I need a string that contains only the ascii value 13 (a CR)
Code: Select all
dim CR_String as string[1]
...
CR_String[0] = Chr(13)
Filip