OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                           

4.29 FAQ-388 What can I do if the size of for-loop exceed limitation?

Last Update: 2/3/2015

In LabTalk, the script length limitation of the for loop command is 3072 characters, including white spaces. If the script is too long, you can use define command to first define a macro then call the macro in the loop.


// Define three macros
define Part1 {ty one;}; 
define Part2 {ty two;}; 
define Part3 {ty three;}; 

// Call macros within for loop
int ii=0; 
for (ii=0;ii<3;ii++) 

Keywords:loop, define macro, character limitation, for, macro


© OriginLab Corporation. All rights reserved.