Segfault using integer index on associative array

spencertk <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
Is it possible to use an integer index on the storage variable in an
associative array? For instance:

DEFINE a_ohvalue ASSOCIATE CHAR(4) WITH ARRAY[100] OF
DECIMAL(15,2)

DEFINE adx CHAR(4) # Alpha index.

DEFINE idx INTEGER # Integer index.

LET adx="MSP" # Set alpha index value.

LET a_ohvalue<<adx>>=10.00 # Store value with alpha index.

#

# Now switch to integer index on the array. If contents non-null, use
the stored value.

#

FOR idx=1 TO 100 # Incr integer index over array.

IF a_ohvalue[idx] IS NOT NULL

THEN

LET other_var=a_ohvalue[idx]

END IF

END FOR

The idea is to accumulate with IF/NULL logic and then loop through the
array with a simple loop to dump it's contents.

When I compile code using this method it throws a Segmentation fault.
Please advise if alternate method.

Spence

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.