my memory is failing
jazzwyld
Posts: 199
How do I do a carriage return is ascii.
I'm trying to have a long string of text send to a panel and I need it almost in paragraph form.
I'm trying to have a long string of text send to a panel and I need it almost in paragraph form.
0
Comments
I believe its the pipe character '|'.
Paul
The ASCII character for carriage return is 13 or $0D.
Now if you're doiing unicode the limit is around 40-50 bytes since they are widechars but there is no ^BAT type command for them so you can't easily append. The work around is multiple buttons of 40-50 characters each which isn't really a suitable workaround IMHO.
"^M"
"|" (pipe),as has already been said
You can always append your text.
http://www.amxforums.com/showthread.php?t=821
The thing is, there is no type-able or print-able ASCII character for a carriage return. It's decimal 13, or a hex 0D ... anything else is just a shortcut understood by whatever you are using to represent it, and you can't guarantee that shortcut is universal. The pipe was used in TPD as a shortcut to add a line break within a button text, but just try it and an e-mail, and all you will get is the pipe. TPD3 allows you to hold the control key and hit enter to insert it. Some programs recognize a caret as a control key shortcut; I never tried a ^M in TPD or as part of a button text, so I don't know if it will work there or not ... but it will work in other contexts. Most Windows computers will let you hold down the ALT key and type 013 to get it ... but it's up for grabs whether your current application will insert a CR or hit your OK button when it sees it come in. So I simply got in th habit of building the string with the decimal value inserted, and I don't have to worry about it.