Jump to content
Developer Wiki and Function Reference Links ×

ASCII / ANSSI vss files


Recommended Posts

I noticed some weird behaviour about special characters.

PIO => POPUP PARAM

values " x mm? " can be loaded into a string and made visible in the drawing.

Defining a string in the PIO with concat (x,' mm?') will return another char for "?".

The same string but different output. Does it depend on how I save my vss files ? (using notepad++)

I tried looking up the ascii code to use with Chr instead, yet the number doesn't give the right symbol as stated in the table ?

Link to comment
  • 2 months later...

To make it a bit easier for myself, I generated an ASCII table in a worksheet, listing all the symbols from chr(1) To chr(255). This table was generated by a simple script.

Now, when selecting a number to be used in the naming of string with an "?" chr(145) according to my list, the used symbol is not the one listed in my worksheet. Instead I get ? , which has number 149 in my list.

-I didn't change my font at any time

-The list was generated a second before testing my other script with the symbol and refreshed afterwards just to be sure..

Anyone ?

Edited by hippothamus
Link to comment

I changed my ASCII table script, to list another column, being the concat of chr(X). Starting from number 128: the symbol is different ?? :/

I guess I'll need to get used to turning it into a string at all times when using the Chr function.

PROCEDURE ASC;
VAR
BladHd	:HANDLE;
i	:INTEGER;
WsName	:STRING;

BEGIN
WsName:='ASCII';
BladHd:=GetObject(WsName);
IF BladHd = NIL THEN BEGIN
	BladHd:=CreateWS(WsName,256,3);
	SetWsCellFormula(BladHd,1,1,1,1,'ASCII Number');
	SetWsCellFormula(BladHd,1,2,1,2,'ASCII Symbol');		
	SetWsCellFormula(BladHd,1,3,1,3,'ASCII concat(Symbol)');		
END;

FOR i:=1 TO 255 DO BEGIN
	SetWsCellFormula(BladHd,i+1,1,i+1,1,concat(i));
	SetWsCellFormula(BladHd,i+1,2,i+1,2,Chr(i));		
	SetWsCellFormula(BladHd,i+1,3,i+1,3,concat(Chr(i)));
END;

END;
Run(ASC);

Edited by hippothamus
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...