Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variables defined in script

Hi,

I like to define my variables in script, in case my qvw gets screwed (and I find it more easy to make changes after that).

So I define them like this for instance :

set comite_init = NUM(LEFT($(comite),4),'0000')   & '01';

But in the case there are $ sign expansions in the variable, qv replace it with the value of the other $() variable.

How do i get to write :

set year_plus_1 = $(this_year) + 1

without qv transforming it into 2013+1

?

Thanks

1 Reply
Gysbert_Wassenaar

This works:

set year_plus_1 = @(this_year) + 1;

let year_plus_1 = replace(year_plus_1,'@','$');

Or simply like this:

let year_plus_1 = '$' & '(this_year) + 1';



talk is cheap, supply exceeds demand