|
Effectively ARR(*) is the same as just ARR.
The following results were produced.
D myArray S 4A Dim(30)
myArray(*) = 'A';
// All elements contain 'A '
myArray = 'B';
// All elements contain 'B '
myArray(*) = *ALL'C';
// All elements contain 'CCCC'
myArray = *ALL'D';
// All elements contain 'DDDD'
myArray(1) = *ALL'E';
// Element myArray(1) contains 'EEEE' other elements untouched.
myArray(1) = 'F';
// Element myArray(1) contains 'F ' other elements untouched.
-Bob Cozzi
www.iSeriesTV.com
iPod your industry news instead of reading it.
Coming July 18, 2006
Ask your friends to tune into iSeriesTV.com
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of AGlauser@xxxxxxxxxxxx
Sent: Monday, June 19, 2006 3:18 PM
To: RPG programming on the AS400 / iSeries
Subject: Setting all elements of an array
Hi all -
I recall reading someplace that it is possible to set all elements of an
array to a given variable using the syntax 'array(*) = value'. Am I out
to lunch? The actual behaviour seems to be that only the first element of
the array is assigned the given value.
I have searched the web, 'The Modern RPG IV Language', IBM docs, but I
can't reach archive.midrange.com, so I apologize if this is an old
question.
Thanks in advance,
Adam
################################################################################
#####
Attention:
The above message and/or attachment(s) is private and confidential and is
intended
only for the people for which it is addressed. If you are not named in the
address
fields, ignore the contents and delete all the material. Thank you. Have a nice
day.
For more information on email virus scanning, security and content
management, please contact administrator@xxxxxxxxxxxx
################################################################################
#####
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.