Page 1 of 1

addin

Posted: Mon May 30, 2022 7:45 am
by amrsherif
Hi,

I am writing an addin and would like to grab the input from users. Typically i loop through each input word like so:

------
string input=""
for %num 0 1 2 3 4 5 6 7 8 9 10
if %{%num}<>"" then
input=input+%{%num}+" "
endif
next

input=@ltrim(input)
input=@rtrim(input)
------

However, in this case, i would like to grab all the text within quotes. The number of words inside the quotes is unknown.
for example: fetch(d=db) "series1 data_type" "series2 data_type1 data_type2"

Is there a way to use the quotes as a delimiter in this case?

Re: addin

Posted: Mon May 30, 2022 3:22 pm
by EViews Gareth
I don’t follow. But perhaps @word does what you want.

Re: addin

Posted: Tue May 31, 2022 12:36 pm
by amrsherif
in this example:

fetch(d=db) "series1 data_type" "series2 data_type1 data_type2"

I am looking for a way to take the red text as the first user input "series1 data_type", and the blue text as the second "series2 data_type1 data_type2".
In other words, everything between the quotes as one input.

Re: addin

Posted: Tue May 31, 2022 1:22 pm
by EViews Gareth
@word

Re: addin

Posted: Tue May 31, 2022 1:37 pm
by amrsherif
That works. Thanks