Lasso Soft Inc. > Home

  • Articles

[Loop_Continue] Crash When Nested in Looped [Inline]


Problem

Users can experience Lasso 8.6 crashes when using the [Loop_Continue] tag within an [Inline] container that is nested in an [Iterate] or [Loop] tag. For example: 

iterate( array( 1, 2, 3, 4, 5 ), local( 'x' ) );
	inline;
		if( #x == 3 );
			loop_continue;	// Crashes
		/if;
	/inline;
/iterate;

 

Solution

Here is a workaround using a change in the logic to avoid the use of [Loop_Continue] in these situations. For example:

local( 'loopCont' = false );
iterate( array( 1, 2, 3, 4, 5 ), local( 'x' ) );
	inline;
		// Call [Loop_Continue]? If x is 3.
		#loopcont = ( #x == 3 ? true | false );

		
		if( !#loopCont );
			// Put all code that would go after [Loop_Continue] here.
			
		/if;
	/inline;

	// Call [Loop_Continue] if necessary
	if( #loopCont );
		loop_continue;
	/if;

	// Rest of code that should be skipped, if any
/iterate;

 

Comments

No comments found
You must be logged in to comment.

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft