Crimson Ascii

Brijm

Lifetime Supporting Member
Join Date
May 2006
Location
St. Marys, PA
Posts
645
I have something I'm having trouble with in Crimson. I want to create a Batch name, and to keep a unique name, add a letter to suffix the Stage Name. So I would see it as Stage1, Stage1A, Stage1B, and so on.

How can I get an ascii character from an Integer? ie... I add a my use count to 65 to obtain the letter suffix?
 
I had this same question awhile back. According to the Crimson 2 manual (page 222):
"You may also use the addition operator to add an integer to a string, in which case a single character equal to the ASCII code represented by the integer is appended to the data in the string."

I interpreted this to mean that I could use something like this:
Code:
cstring testvar
testvar := "Hello" + 65
to produce "HelloA". However, that code would not compile for some reason (type mismatch error). After contacting tech support I found that it had to be written this way:
Code:
cstring testvar
testvar := "Hello"
testvar += 65
That was all in Crimson 2 of course, not sure if things have changed in C3.
 
I had this same question awhile back. According to the Crimson 2 manual (page 222):
"You may also use the addition operator to add an integer to a string, in which case a single character equal to the ASCII code represented by the integer is appended to the data in the string."

I interpreted this to mean that I could use something like this:
Code:
cstring testvar
testvar := "Hello" + 65
to produce "HelloA". However, that code would not compile for some reason (type mismatch error). After contacting tech support I found that it had to be written this way:
Code:
cstring testvar
testvar := "Hello"
testvar += 65
That was all in Crimson 2 of course, not sure if things have changed in C3.

I'll give that an attempt. Thanks. I had tried your first example, and got the type mismatch error.
 

Similar Topics

Hey guys, hoping someone here could give me a little advice. I'm working with a CR1000-04000 in Crimson 3.1 and I was interested in adding the...
Replies
4
Views
115
Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
4
Views
191
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
107
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
91
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
89
Back
Top Bottom