Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check if IStringMap is already declared
#1
Supposed that an IStringMap variable has to be as "-", as in the following example :

Function tempf03
Code:
Copy      Help
IStringMap- label._create
label.Flags=1
err
,label.GetList(_s)
,out _s
,label.RemoveAll

sub.Add
#sub Add
IStringMap- label
label.Add("item1" "value1")

Function tempf03 is called several times by :

Function tempf04
Code:
Copy      Help
tempf03

tempf03

I wonder whether there exists a simpler way to check if IStringMap is already declared in temp03.

I understand that another way might have been by declaring sub-function "Add" with flag "v" :

Function tempf05
Code:
Copy      Help
IStringMap label._create

sub.Add
label.GetList(_s)
out _s

#sub Add v

label.Add("item1" "value1")

Any advice is mostly welcome. Many thanks in advance.
#2
if(label=0)
,label._create
#3
Perfect and simple! Many thanks indeed.


Forum Jump:


Users browsing this thread: 1 Guest(s)