//In the line above we would like to use the variable activecol instead of the value 3, like: // int numPeaks = %([PeaksBK$]PeaksSHT$!col(activecol)[C]$); //but this doesn't work.
type "activecol = $(activecol)"; type "numPeaks = $(numPeaks)"; type "%A"; for(int i = 1; i <= numPeaks; i++){ draw -c 1 -d 0 -l -v aa[i]; }
5 L A T E S T R E P L I E S (Newest First)
yuki_wu
Posted - 08/29/2019 : 01:44:56 AM Hi All,
Sorry that I wasn’t aware Lowell desired to use % with an embedded $. For now, it is not allowed the embedded use of % and $. Instead of the workaround that James mentioned, we can use string registers to avoid this:
int aa = 3;
%A = col($(aa))[L]$;
int aa = %A
Regards, Yuki
OriginLab
RiverFalls
Posted - 08/28/2019 : 12:33:34 PM James, That worked exactly the way we want. Thank you! Lowell