× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> I like how it clarifies exactly what you're changing. It
> would be nice if there was Pascal's "with" op code. This would let you
> do something like:

What's unclear about 'featTypeDS.type'?  Better yet, why not 
'widget.properties.feature' or 'widget.properties.type'?

If one really wants to put type information varible names, the "Hungarian 
notation" method is the most sane way that I have encountered.  See <link> 
http://www.apostate.com/programming/hugarian/ </link>. The example would 
become something like:


> >       d sFeatType      ds                  Qualified
> >       d   cFeat                       3    dim(1000)
> >       d   cType                       2    dim(1000)


I don't claim to be an expert, so the above may be not quite right, but 
you get the idea - there is a one character type qualifier on the front of 
each variable name.

Personally, I tend to think that such conventions are somewhat cumbersome, 
and probably cause more work in the long run than just looking up the 
defined type of the variable (much easier if you have an outline view!).

Alan's comment:
>> Why is this funny? If you have 2 fields on a file also called dsFeat &
>> dsType, but you do NOT want one set to overwrite the other set, this
>> methodology is EXACTLY what you want.

is certainly a valid one.  I would argue however, that it is more a work 
around to get the functionality of namespaces in RPG, rather than an ideal 
way to use a data structure - which leads to cumbersome naming.  Also, is 
it necessary to have the field name in the file and the name of the second 
type be exactly the same?

Just MHO,
Adam




rpg400-l-bounces@xxxxxxxxxxxx wrote on 24/05/2006 12:04:35 PM:

> Not really and I like how it clarifies exactly what you're changing. It
> would be nice if there was Pascal's "with" op code. This would let you
> do something like:
> 
> With FeatTypeDS 
>   .dsFeat(x) = 'foo'
>   .dsType(x) = 'br'
> EndWith
> 
> I have Pascal the syntax slightly wrong (I know the lines have to end
> with something, I don't recall what it is), but I think this illustrates
> it.
> 
> Matt
> 
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
> Sent: Wednesday, May 24, 2006 11:53 AM
> To: RPG programming on the AS400 / iSeries
> Subject: RE: Pointer / Based issue
> 
> Just picking nits here, but does anyone else find it funny to prefix 
> fields within a QUALIFIED data structure?
> >       d FeatTypeDS      ds                  Qualified
> >       d   dsFeat                       3    dim(1000)
> >       d   dsType                       2    dim(1000)
> 
> So now I have FeatTypeDS.dsFeat and FeatTypeDS.dsType?
> 
> 
> Rob Berendt
> -- 
> Group Dekko Services, LLC
> Dept 01.073
> PO Box 2000
> Dock 108
> 6928N 400E
> Kendallville, IN 46755
> http://www.dekko.com
> 
> 
> -- 
> 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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.