Chapter Contents |
Previous |
Next |
SAS Component Language: Reference |
You can initialize an SCL list
DCL list mylist={1,2,'a',3,'b','c'};Your list may also contain sublists. For example:
DCL list mylist={1,2,'a',mysub={'A','B','C', 3,'b','c'}};
DCL list employee; emp = {id=9999, name='Thomas', locate={bldg='R', room='4321'}};
class work.a.InitVal.class; public list list1 / (InitialValue= {COPY={ POPMENUTEXT='Copy here', ENABLED='Yes', METHOD='_drop' }, MOVE={ POPMENUTEXT='Move here', ENABLED='Yes', METHOD='_drop' } } ); public list list2 / (initialValue= {1,2,3,{'abc','def',{1,2,'abc'},3},'def'}); public list list3 / (initialValue= {id=888,name=Rob, answers={mchoice={'a','c','b','e'}, math={1,4,8,9,}} } );For more information about creating classes, see CLASS.
Note: Even if you
initialize a list
with a DCL or assignment statement or with the
initialValue
attribute (rather than using one of the INSERT functions),
you must still explicitly delete the list as described in Deleting Lists and List Items.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.