How to convert numbers to string values
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-08-25 07:04 PM
‎2004-08-25
07:04 PM
I need to change numbers into text so that I can combine text strings in the TEXT2 command.
What can be done?
for example...
I want to have the text from the file name "TYP B00 3D" read as "B12 3D"
I have set up a series of string commands to break the name into different parameters.
Thus there is
junk= !TYP
cab= ! B
cabsize=00
drawernum=3
cabtyp= ! D
A=12
TEXT2 0, 0, cab+A+" "+drawernum+cabtyp
Problem is this express has syntax errors. I need to change the "A" and "drawernum" parameters into text values.
How can this be done?
TIA
Terrence Sturm, Architect
_______________
MBP OSX 10.15.4 Quad Core Intel i7 2.2hz
AC 17 build 5019
AC 22 build 7000
AC 23 build
AC 24 build 5000
_______________
MBP OSX 10.15.4 Quad Core Intel i7 2.2hz
AC 17 build 5019
AC 22 build 7000
AC 23 build
AC 24 build 5000
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-08-25 10:53 PM
‎2004-08-25
10:53 PM
tsturm wrote:Take a look at the STR function. For example, if A has the value 123, the expression STR(A, 3, 0) changes it to the string "123".
Problem is this express has syntax errors. I need to change the "A" and "drawernum" parameters into text values. How can this be done?
Ralph Wessel BArch
Central Innovation
Central Innovation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-08-26 05:57 AM
‎2004-08-26
05:57 AM
Is it true that the SPLIT command will change numbers written as string into numbers?
For example the expression of
TIA
For example the expression of
stringtext=134.56 SPLIT(stringtext," %n", stringnumber)Then I would get a number instead of text?
TIA
Terrence Sturm, Architect
_______________
MBP OSX 10.15.4 Quad Core Intel i7 2.2hz
AC 17 build 5019
AC 22 build 7000
AC 23 build
AC 24 build 5000
_______________
MBP OSX 10.15.4 Quad Core Intel i7 2.2hz
AC 17 build 5019
AC 22 build 7000
AC 23 build
AC 24 build 5000
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-08-26 10:33 PM
‎2004-08-26
10:33 PM
tsturm wrote:Close - try something like this:
Is it true that the SPLIT command will change numbers written as string into numbers?
For example the expression ofstringtext=134.56 SPLIT(stringtext," %n", stringnumber)Then I would get a number instead of text?
TIA
strVal = "123.45" numVal = 0 howMany = split(strVal, "%n", numVal)You will end up with the numeric equivalent of 'strVal' in 'numVal', and 'howMany' should be 1 to tell you that one value was extracted from the string.
Ralph Wessel BArch
Central Innovation
Central Innovation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2004-08-27 06:03 PM
‎2004-08-27
06:03 PM
I think that I now have a better understanding of how to change numbers into text and back again.
Now if GS would just make a STRING command to simply toggle the stuff around I would not need to type out things such as
How about a command like STNT(number) to change numbers to text and STTN(string) to change text to numbers.
Perhaps.
Now if GS would just make a STRING command to simply toggle the stuff around I would not need to type out things such as
part_num=159684 part_name=STR(part_num, 7, 0)to change numbers to text.
How about a command like STNT(number) to change numbers to text and STTN(string) to change text to numbers.
Perhaps.
Terrence Sturm, Architect
_______________
MBP OSX 10.15.4 Quad Core Intel i7 2.2hz
AC 17 build 5019
AC 22 build 7000
AC 23 build
AC 24 build 5000
_______________
MBP OSX 10.15.4 Quad Core Intel i7 2.2hz
AC 17 build 5019
AC 22 build 7000
AC 23 build
AC 24 build 5000