Inhalt

Index

Example for SPLIT

string = "3 windows, size 100x140cm" !defines the string which should be evaluated

format = "%n windows, %s %n %s %n %s" !defines the format, how the strings should be split

y = SPLIT ( string , format , var1 , var2 , var3 , var4 , var5 , var6 , var7 ) !splits the text, which is defined in the variable string, and assigns the different parts to the variables var1 to var7.

IF y = 7 THEN !continue only, if the text could be split into 7 parts

PRINT "Nr.: " , "\t" , var1 , "\n" , "Size: " , "\t" , var4 , " x " , var6 !displays the number of windows and the size in a message box

ENDIF

In the following picture you can see how the values for string and format connect to the parameters for the SPLIT command in the example above:

Note: If you do not need all variables var1 to var7, you can assign the same variable to several parts of the text.



Allplan

(C) ALLPLAN GmbH

Privacy policy