F
fogh
Guest
Hi CCC,
Again I wrote something ugly. Can anyone help me get rid of the "evalstring"
below and replace it with stg decent ?
substitutionkey="69"
templates='(
(
Q69
(imag(i("/V69/PLUS" ?result "ac-ac")) /real(i("/V69/PLUS" ?result "ac-ac")) )
)
(
C69
(-imag(i("/V69/PLUS" ?result "ac-ac")) /(twoPi * xval(i("/V69/PLUS" ?result
"ac-ac"))))
)
);templates
index=1
Outputs=nil
while(index < 20
foreach( tpl templates
o=make_sevOutputStruct()
o->index=index
o->march=o->save=o->selectionDetail=o->type=o->signal=nil
o->plot=t
o->name=gsub(substitutionkey
sprintf(nil "%L" index)
nth(0 tpl) )
o->expression=evalstring(strcat("'"
gsub(
substitutionkey
sprintf(nil "%L" index)
nth(1 tpl) ) ))
);foreach
index++
Outputs=cons(o Outputs)
);while index
Outputs=reverse(Outputs)
session=asiGetCurrentSession()
sevsession=session->data->sevSession
session->data->outputList=sevsession->outputs=Outputs
sevUpdateOutListBox(sevsession)
Again I wrote something ugly. Can anyone help me get rid of the "evalstring"
below and replace it with stg decent ?
substitutionkey="69"
templates='(
(
Q69
(imag(i("/V69/PLUS" ?result "ac-ac")) /real(i("/V69/PLUS" ?result "ac-ac")) )
)
(
C69
(-imag(i("/V69/PLUS" ?result "ac-ac")) /(twoPi * xval(i("/V69/PLUS" ?result
"ac-ac"))))
)
);templates
index=1
Outputs=nil
while(index < 20
foreach( tpl templates
o=make_sevOutputStruct()
o->index=index
o->march=o->save=o->selectionDetail=o->type=o->signal=nil
o->plot=t
o->name=gsub(substitutionkey
sprintf(nil "%L" index)
nth(0 tpl) )
o->expression=evalstring(strcat("'"
gsub(
substitutionkey
sprintf(nil "%L" index)
nth(1 tpl) ) ))
);foreach
index++
Outputs=cons(o Outputs)
);while index
Outputs=reverse(Outputs)
session=asiGetCurrentSession()
sevsession=session->data->sevSession
session->data->outputList=sevsession->outputs=Outputs
sevUpdateOutListBox(sevsession)