From: Marc R. <re...@gm...> - 2023-01-11 14:05:39
|
Hi Leslie, by defining list[level1, level2] you do not define list[level1]. if you want to check existence of level1, you must assign it a value. Check the following: a='' b='' a['level1', 'level2']=1 b=a['level1'] if a.exists('level1') then say 'a[''level1''] exists' if b.exists('level2') then say 'a[''level1'', ''level2''] exists' a['level1'] = 1 if a.exists('level1') then say 'now a[''level1''] exists' I think that is consistent with classic rexx's stems. Marc On 1/11/23 14:42, Jeff Hennick wrote: > This might get better responses out on a more general NetRexx list. I'm not qualified to answer. > > On 1/10/2023 11:36 PM, J Leslie Turriff wrote: >> Hi, >> Say I want to use an indexed string with two levels of indices: >> | list[level1,level2] >> Can I use >> | list.exists(index) >> to test just the first level? Or would it be >> | list.exists(index,) >> ? >> >> Leslie >> -- >> Platform: GNU/Linux >> Hardware: x86_64 >> Distribution: openSUSE Leap 15.4 >> NetRexx: 4.03-GA build 260-20220503-1730 >> >> >> _______________________________________________ >> netrexx-pipelines mailing list >> net...@li... >> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines > > > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |