|
jurz Novice
Joined: 22 Feb 2002 Posts: 48 Location: Latvia
|
Posted: Thu Mar 08, 2007 7:57 am
FORALL issue |
Hi,
I have a variable that holds array of numbers. i.e.
var = 1|3|19|23|45
I'm getting value of this variable using %comget
and a command that inside the script performs
#FORALL @var {enter %i}
Now the problem is, that if I'm setting variable var type to be
"String List" #FORALL cycle works flawlessly no matter what
I do there. However next time i'm doing
#var var %comget(bla bla bla)
the type for var is being set to "Auto Type"
and #FORALL doesn't work anymore. Tho it still holds
list of items similar to first one.
Can anyone give me a suggestion how to force variable type
to be string list? And i'm also wondering is this a bug or a
feature?
Thanks in advance,
Jurz |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Thu Mar 08, 2007 11:14 am |
#FORALL @var {#EXEC {enter %i}}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
jurz Novice
Joined: 22 Feb 2002 Posts: 48 Location: Latvia
|
Posted: Thu Mar 08, 2007 11:43 am |
I think you are not getting my point.
#FORALL @var ir not getting executed if variable is of type "Auto Type"
but it does work if @var is of type "String List" |
|
_________________ -Jurz |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Thu Mar 08, 2007 12:35 pm |
#CALL %vartype I believe
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Mar 09, 2007 8:08 am |
Also I am not sure what you are using %comget for. If you are actually retrieving a value from a COM object it is likely returning either a single typeable value, another COM object, or a variant array. In the case of a variant array you have to %arrget and related functions, for a COM object you would have to refer to its documentation as to usage, and single values would either be a string or number that the autotyping would handle. So perhaps you should provide what your actually doing instead of "bla bla bla".
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
jurz Novice
Joined: 22 Feb 2002 Posts: 48 Location: Latvia
|
Posted: Mon Mar 12, 2007 7:49 am |
Thanks for help everyone, %vartype helped
Vijilante, %comget bla bla bla returns string that looks like 5|1|4|6
-Jurz |
|
_________________ -Jurz |
|
|
|
|
|