| |||||||||||||||||
Working with lists Description A series of examples showing some of Mosel's list handling functionality:
Source Files By clicking on a file name, a preview is opened at the bottom of this page.
Data Files listops.mos (!****************************************************** Mosel User Guide Example Problems ================================= file listops.mos ```````````````` List operations. (c) 2008 Fair Isaac Corporation author: S. Heipcke, Nov. 2006 *******************************************************!) model "List operations" declarations L,M: list of integer end-declarations L:= [1,2,3] + [4,5]; writeln("L (1): ", L) L+= [6,7,8]; writeln("L (2): ", L) L-= [1,2,3]; writeln("L (3): ", L) M:= sum(l in L) [l*2]; writeln("M: ", M) writeln("L and M are different: ", L<>M) end-model | |||||||||||||||||
© Copyright 2023 Fair Isaac Corporation. |