|
"Bartell, Aaron L. (TC)" wrote: > > I think my want for qualified procedure names comes more for a want to > create my own data types within the language and the qualified procedure > names are just a step in that direction. If we were given the ability to > create our own data types then I would have no need for the qualified > procedure names, I would just have to be able to qualify the instantiation > of an object so I could specify directly which procedure I was referring to. > > I can see all these steps being taken to simulate our own data types (work > with me here -- ILE sub procedures, QUALIFIED data structures, etc...) I > guess what I am wondering is when RPG is going to make the leap to being > able to create it's own data types? I think that would be a revolutionary > step in the life of RPG as a programming language and would greatly benefit > the language as far as new interest goes. > Sorry, Aaron. I think we're talking at cross purposes here. Do you mean you want to do this? d a s type(whatever) d b s type(whatever) a.proc(parm); b.proc(parm); If that's what you're asking for, then I have no idea if or when RPG might go down that path. I was talking about module MODA having procedure proc and module MODB having procedure proc, and callers being able to say MODA.proc() or MODB.proc(). If that's also what you were talking about, then I don't see the connection to creating your own data types. But you can already do a pretty good job of creating your own data types in RPG. * copy file for module XYZ D XYZ_Handle_t s 10i 0 D XYZ_Create pr LIKE(XYZ_Handle_t) D XYZ_Destroy pr D handle LIKE(XYZ_Handle_t) const D XYZ_DoSomething pr D handle LIKE(XYZ_Handle_t) const D parm whatever * User for type XYZ /copy XYZ D myXYZ s LIKE(XYZ_Handle_t) c eval myXYZ = XYZ_Create() c callp XYZ_DoSomething (myXYZ : someparm) c if XYZ_getFld1 (myXYZ) = 0 c callp XYZ_setFld2 (myXYZ : 'abc') ... c callp XYZ_Destroy (myXYZ) or, if you want your users to access some of the data directly: * copy file for module XYZ D XYZ_Handle_t ds qualified D private 10i 0 D fld1 10i 0 D fld2 10a D XYZ_Create pr D handle LIKEDS(XYZ_Handle_t) const D XYZ_Destroy pr D handle LIKEDS(XYZ_Handle_t) const D XYZ_DoSomething pr D handle LIKEDS(XYZ_Handle_t) const D parm whatever * User for type XYZ /copy XYZ D myXYZ ds LIKEDS(XYZ_Handle_t) c callp XYZ_Create(myXYZ) c callp XYZ_DoSomething (myXYZ : someparm) C if myXYZ.fld1 = 0 c eval myXYZ.fld2 = 'abc' ... c callp XYZ_Destroy (myXYZ) Barbara ===
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.