Now that there is a clean syntax for creating array objects using just an expression, an OF
method for the map collections is now a workable item:
d = .directory~of((a, b), (c, d))
is a nice quick method of creating and populating a collection.
Anonymous
CodeCommitted revision [r10557].
Related
Commit: [r10557]
such as
d = .directory~of((a, b), (c, d))
r = .relation~of((a, b), (c, d))
t = .table~of((a, b), (c, d))
st= .stringtable~of((a, b), (c, d))
it= .identitytable~of((a, b), (c, d))
instancetable in mail was a typo, I presume!
Yes, you got it. The index is the first array item, the value is the
second. The indexes need to conform to all requirements of the collection
type, as expected. Thus the index for directory or stringtable must be as
string.
The arguments of processed left-to-right and added to the collection.
Rick
On Thu, Oct 9, 2014 at 3:16 PM, Walter walter-pachl@users.sf.net wrote:
Related
Feature Requests:
#616View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
"The arguments of processed left-to-right and added to the collection."
arguments may override earlier ones:
d = .directory~of((a, b),(a,b),(a, c)) ; Do e over d for 82; say e~string'->'d[e]; End
shows A->C
That was only a statement in which order the items are added to the
collections. The mapped collections themselves have no ordering. This
statement was referring to situations like this:
d = .directory~of(("A", 1), ("A, 2))
say d['A']
this will display 2, because the second argument replaces the value set by
the first argument.
Rick
On Thu, Oct 9, 2014 at 5:11 PM, noreply@in.sf.net wrote:
Related
Feature Requests:
#616d = .directory~of((a, b),(a,b),(a, c)) ; Do e over d for 82; say e~string'->'d[e]; End
d2= .directory~of((x, y),(y,z),(d, c)) ; Do e over d for 82; say e~string'->'d[e]; End
This error message MAY be confusing:
1232 - Method OF with scope "MapCollection" in package "REXX" (no source available).
34 - d2= .directory~of((x, y),(y,z),(d, c)) ;
Error. 93 running. REXX line. 1232: Incorrect call to method.
Error. 93.938: Method argument 2 must have a string value.
The d in the third pair is the culprit
This looks like a good place to switch this error over to the named message
type. Expect the message numbers to change in the next build.
Rick
On Thu, Oct 9, 2014 at 5:29 PM, Walter walter-pachl@users.sf.net wrote:
Related
Feature Requests:
#616Three equivalent ways to fill the directory:
d1=.directory~of((1,A),(2,B))
d2=.directory~new
d2~put(A,1)
d2~put(B,2) ---- this is why d above is argument # 2
d3=.directory~new
d3[1]=A
d3[2]=B
Don't forget #4
d4 = .directory~new
On Thu, Oct 9, 2014 at 5:44 PM, Walter walter-pachl@users.sf.net wrote:
Related
Feature Requests:
#616Don't forget #4
d4 = .directory~new
d4~1 = A
d4~2 = B
On Thu, Oct 9, 2014 at 5:46 PM, Rick McGuire object.rexx@gmail.com wrote:
Related
Feature Requests:
#616A subtle difference or a bug??
d=.directory~new
d3=.directory~new
--d3[d]=C ------ fails
d4=.directory~new
d4~d=Z ------ works !!!!
Not even a subtle difference. The value you are trying to use as an index
in the first is a directory item, but the message form uses a string.
Definitely NOT a bug.
Rick
On Thu, Oct 9, 2014 at 6:05 PM, Walter walter-pachl@users.sf.net wrote:
Related
Feature Requests:
#616I have started some test cases and marked the 'surprising' results with ????
I indtend to add these tests to the existing Directory.testgroup
And ask for additional ideas
Well, it would help if you had indicated why you thought those were surprising results, so I'm going to have to guess here.
test_of_4
Don't know why you think this is surprising. The variable D evaluates to the directory object you created on the line before...which is most definitely NOT a string value. Come on Walter, this is basic Rexx.
test_for_2 and test_for_3
As I stated yesterday, map collections are not ordered. When you iterate through a collection it has no relationship to the order in which the items were added. There is no situation where this could be considered a valid test to add.
but I did show what I expected (erroneously)
e.g. the Floop over FOR 0 should leave the undefined.
And can you throw ideas at me?
No, you only assert that you expect it to be undefined, but you do not
explain WHY you expect it to be undefined.
If the FOR 0 on the DO loop does not prevent the control variable from
getting updated during the initial part of the loop.
Rick
On Fri, Oct 10, 2014 at 11:46 AM, Walter walter-pachl@users.sf.net wrote:
Related
Feature Requests:
#616Ok. Thanks
Ideas?
Von: Rick McGuire [mailto:bigrixx@users.sf.net]
Gesendet: Freitag, 10. Oktober 2014 17:53
An: [oorexx:feature-requests]
Betreff: [oorexx:feature-requests] Re: #616 Add an OF method to Map
collections
No, you only assert that you expect it to be undefined, but you do not
explain WHY you expect it to be undefined.
If the FOR 0 on the DO loop does not prevent the control variable from
getting updated during the initial part of the loop.
Rick
On Fri, Oct 10, 2014 at 11:46 AM, Walter walter-pachl@users.sf.net
walter-pachl@users.sf.net wrote:
but I did show what I expected (erroneously)
e.g. the Floop over FOR 0 should leave the undefined.
And can you throw ideas at me?
[feature-requests:#616]
http://sourceforge.net/p/oorexx/feature-requests/616 Add an OF method to
Map collections
Status: accepted
Milestone: 5.0.0
Created: Thu Sep 25, 2014 05:36 PM UTC by Rick McGuire
Last Updated: Fri Oct 10, 2014 03:33 PM UTC
Owner: Rick McGuire
Now that there is a clean syntax for creating array objects using just an
expression, an OF
method for the map collections is now a workable item:
d = .directory~of((a, b), (c, d))
is a nice quick method of creating and populating a collection.
Sent from sourceforge.net because you indicated interest in <
https://sourceforge.net/p/oorexx/feature-requests/616/
https://sourceforge.net/p/oorexx/feature-requests/616 >
To unsubscribe from further messages, please visit <
https://sourceforge.net/auth/subscriptions/
https://sourceforge.net/auth/subscript-disabledions >
[feature-requests:#616]
http://sourceforge.net/p/oorexx/feature-requests/616 Add an OF method to
Map collections
Status: accepted
Milestone: 5.0.0
Created: Thu Sep 25, 2014 05:36 PM UTC by Rick McGuire
Last Updated: Fri Oct 10, 2014 03:46 PM UTC
Owner: Rick McGuire
Now that there is a clean syntax for creating array objects using just an
expression, an OF
method for the map collections is now a workable item:
d = .directory~of((a, b), (c, d))
is a nice quick method of creating and populating a collection.
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/oorexx/feature-requests/616/
https://sourceforge.net/p/oorexx/feature-requests/616
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
https://sourceforge.net/auth/subscript-disabledions
Related
Feature Requests:
#616Sorry, ideas about what?
On Fri, Oct 10, 2014 at 12:09 PM, Walter Pachl wpachlgeshi@users.sf.net
wrote:
Related
Feature Requests:
#616about test cases for of & for
Walter Pachl
Well, for the OF testcases, I don't see many tests for the index-value
pairs. So, just off of the top of my head, you should have tests like
these:
d~of(.nil) -- not an array
d~((1,)) -- index no value
On Fri, Oct 10, 2014 at 12:19 PM, Walter Pachl wpachlgeshi@users.sf.net
wrote:
Related
Feature Requests:
#616Well, for the OF testcases, I don't see many tests for the index-value
pairs. So, just off of the top of my head, you should have tests like
these:
d~of(.nil) -- not an array
d~of((1,)) -- index no value
d~of((,2)) -- value, no index
d~of((1,2,3)) -- to many items in the array
And of course, directory and string table should have tests where the index
is not a string value,
relation should have tests where the same index is specified more than
once.
I don't recall seeing a test where the same index is specified more than
once in a single OF call to demonstrate that the insertion order goes
left-to-right.
On Fri, Oct 10, 2014 at 12:19 PM, Walter Pachl wpachlgeshi@users.sf.net
wrote:
Related
Feature Requests:
#616Looks like I've done it (more or less)
Next task assignment?
Walter
Von: Rick McGuire [mailto:bigrixx@users.sf.net]
Gesendet: Montag, 13. Oktober 2014 23:48
An: [oorexx:feature-requests]
Betreff: [oorexx:feature-requests] #616 Add an OF method to Map collections
[feature-requests:#616]
http://sourceforge.net/p/oorexx/feature-requests/616 Add an OF method to
Map collections
Status: accepted
Milestone: 5.0.0
Created: Thu Sep 25, 2014 05:36 PM UTC by Rick McGuire
Last Updated: Fri Oct 10, 2014 03:46 PM UTC
Owner: Rick McGuire
Now that there is a clean syntax for creating array objects using just an
expression, an OF
method for the map collections is now a workable item:
d = .directory~of((a, b), (c, d))
is a nice quick method of creating and populating a collection.
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/oorexx/feature-requests/616/
https://sourceforge.net/p/oorexx/feature-requests/616
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
https://sourceforge.net/auth/subscript-disabledions
Related
Feature Requests:
#616Well, good timing...about 15 minutes ago I realized that the Stem class
also has an OF method through the miracle of inheritance, so there's one
more set of test cases needed for this.
Rick
On Tue, Oct 14, 2014 at 6:30 AM, Walter Pachl wpachlgeshi@users.sf.net
wrote:
Related
Feature Requests:
#616