|
Except in the case of %addr(). From 'ILE RPG Language Reference': // Each element of the array PARRAY contains the address of the // first element of the array ARRAY. PARRAY = %ADDR(ARRAY); // Each element of the array PARRAY contains the address of the // corresponding element of the array ARRAY. PARRAY = %ADDR(ARRAY(*)); Interestingly, this was the only reference to the special value '*' being allowed as an index to an array that I could find in the manual. Thanks for doing the test ... still not sure what I was looking at yesterday. Adam rpg400-l-bounces@xxxxxxxxxxxx wrote on 19/06/2006 06:26:45 PM:
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
################################################################################
##### -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
##################################################################################### 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.