No conversion from string to numerical?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-24 02:58 PM
‎2009-01-24
02:58 PM
Is it possible to convert a string variable to a numerical value in GDL?
I know it is possible to convert a numerical to a string, but what about the other way? I cannot seem to find any such command.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
7 REPLIES 7
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-24 05:23 PM
‎2009-01-24
05:23 PM
laszlonagy wrote:Hi Laszlo,
Hi guys,
Is it possible to convert a string variable to a numerical value in GDL?
I know it is possible to convert a numerical to a string, but what about the other way? I cannot seem to find any such command.
SPLIT function should do the trick.
string = "3 pieces 2x5 beam"
n = split (string, "%n pieces %nx%n %s", num, string1, size1, string2, size2, name)
print num, string1, size1, string2, size2, name
print vartype(num), vartype(string1), vartype(size1), vartype(string2), vartype(size2), vartype(name)
!!! 1 numeric, 2 string
Cheers,
Olivier
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-24 10:06 PM
‎2009-01-24
10:06 PM
I would like to add, that if you call
SPLIT( "3.45", "%n", X)
it returns X=3.45!
Cheers,
Leo
SPLIT( "3.45", "%n", X)
it returns X=3.45!
Cheers,
Leo

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-24 11:37 PM
‎2009-01-24
11:37 PM
Thanks guys,
I knew there must have been something.
I have not used this command for a very long time.
I knew there must have been something.
I have not used this command for a very long time.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-25 01:53 AM
‎2009-01-25
01:53 AM
You are welcome, new horrible moderator
!
What a pity I couldn't recommend you a function for converting strings (for example) to your daytime and stamina
Good luck,
Leo



What a pity I couldn't recommend you a function for converting strings (for example) to your daytime and stamina

Good luck,
Leo

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-25 07:09 AM
‎2009-01-25
07:09 AM
Leo wrote:Give the guy a chance ... he is nowhere near horrible!
You are welcome, new horrible moderator![]()
![]()
!
Djordje
ArchiCAD since 4.55 ... 1995
HP Omen
ArchiCAD since 4.55 ... 1995
HP Omen
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-25 11:22 AM
‎2009-01-25
11:22 AM
Djordje wrote:Yes Sir, THE MOST HORRIBLE MODERATOR OF THE FORUM WHO WE'VE EVER SEEN AND FOREVER
Give the guy a chance ... he is nowhere near horrible!😉





Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2009-01-25 02:18 PM
‎2009-01-25
02:18 PM
Thanks.

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28