Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Type in the Data Type or You're Fired!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Type in the Data Type or You're Fired!

    David said: "That each and every programmer thinks that their own stuff is golden, and everyone else's methodology is crap." How true. And, don't even dare to say that something trivial is actually trivial! ;-) chuck Opinions expressed are not necessarily those of my employer.

  • #2
    Type in the Data Type or You're Fired!

    "And, don't even dare to say that something trivial is actually trivial!"..........You mean like this entire discussion about data types?!?!? No offense intended, I just could not pass this up! Joe

    Comment


    • #3
      Type in the Data Type or You're Fired!

      Well, yeah! "Joe Wells" wrote in message news:6b2d5029.27@WebX.WawyahGHajS... > "And, don't even dare to say that something trivial is actually > trivial!"..........You mean like this entire discussion about data > types?!?!? > > No offense intended, I just could not pass this up! > > Joe

      Comment


      • #4
        Type in the Data Type or You're Fired!

        No, Dave, I've been somewhat sheltered, starting in RPG/400 in 1989 where code was written or rewritten to take out such RPG II artifacts as left side indicators and other evils, I've only worked on clean code such as BPCS INV500 and ORD500. Speaking of conversions, then I got to work on it as AS/SET generated code. I'll be honest with you, I don't remember exactly what the END statements looked like. I understand the mind tends to suppress traumatic events. Ralph

        Comment


        • #5
          Type in the Data Type or You're Fired!

          Mike, luddite or crudite? I wish I were that erudite. Ralph

          Comment


          • #6
            Type in the Data Type or You're Fired!

            I don't have a problem with what Bob is saying regarding data type code. maybe it's because it was ingrained in me early on to do this. I even put the A in for character. It's about making my intention known to me and other programmers. If I leave the data type field blank, did I really intend to use it packed or character? Did I forget to put the decimal places in, etc...? It's similar to always using the command parameters in CL programs and not use positional values. I think it's bad form to code a copy file CPYF FILE1 FILE2. It should be CPYF FROMFILE(FILE1) TOFILE(FILE2). It makes the code clearer to read and the intent is obvious to anyone reading the code. Eventhough I agree with Bob, I think firing is a bit harsh. Maybe the rack and thumbscrews would do. ;}. Tom.

            Comment


            • #7
              Type in the Data Type or You're Fired!

              We haven't been on a level to use free until a few days ago, so I've not used it. Someone suggested to me a technique for keeping my own if/else/end, do/end select/end more easily readable and maintainable. I've also found it helps me when I'm writing code so that I make sure my else's and ends are where I need them. I simply put i1, i2, i3 ... d1, d2, d3...x1, x2, x3...ei1, ei2, ei3, ed1, ed2, ed3...in the left most column before the sequence numbers in the source. This makes it easier to know where these start and end. I also ususally comment in the code what the levels of if's are for. Seems to help.

              Comment


              • #8
                Type in the Data Type or You're Fired!

                msaxenmeyer1, Just bring up the source code in the LPEX editor, click on "Source" then "Show Indentation". In other words, locate the source code and do four mouse clicks. Chris

                Comment


                • #9
                  Type in the Data Type or You're Fired!

                  Then Reverend Mike says that it's time for an Old Fashioned Revival! Shake the Dust off your Wingtips... Raise up the Big Tent.... Set out on Bicycles 2 by 2.... Maybe even go to down to Charlotte and rent out the Motor Speedway !! Preach to those Goto Usin', Indicator Abusin' Heathens !! Spread the word that RPG will set you /FREE !! Put your hand on the Disk Drives Brother and Feel the Vibration. I smell a Conversion in the Air..... Unfortunately in our case, we're converting to SAP. So Chris.... Alto or Tenor ??

                  Comment


                  • #10
                    Type in the Data Type or You're Fired!

                    The best way i found to identify nested IF/ELSE is to put a number in position 5 of the C-SPEC. See example. Even if programmers are not lazy, I cannot rely on them. A little mistake would change the entire meanining of the program. I have written a utility that puts those numbers in position 5. This is another reason why NOT use /FREE format, since it is impossible as of now to put those numbers in free format code.
                    Code

                    Comment


                    • #11
                      Type in the Data Type or You're Fired!

                      You can still use the first five characters of a line for comments, even in /free format. Joe

                      Comment


                      • #12
                        Type in the Data Type or You're Fired!

                        Well then..... We're certainly not gonna have our next at-Home-RPG-Catalog-Party at your house, now are we ?? Fa-Get-A-Boud-It !!

                        Comment


                        • #13
                          Type in the Data Type or You're Fired!

                          avrahamn wrote: This is another reason why NOT use /FREE format, since it is impossible as of now to put those numbers in free format code. Wrong. You obviously have never tried to use /Free. I put mod marks in columns 1-5 all the time. It works, try it sometime. Maybe there's a bug in your utility program. Regards, Chris

                          Comment


                          • #14
                            Type in the Data Type or You're Fired!

                            ** This thread discusses the article: Type in the Data Type or You're Fired! **
                            This is a discussion about Type in the Data Type or You're Fired!.

                            Click here for the article.

                            Comment


                            • #15
                              Type in the Data Type or You're Fired!

                              ** This thread discusses the article: Type in the Data Type or You're Fired! **
                              Sorry if my English is not so good but my mother tongue is French ! One element is missing: the table name. If you have a field named CUSF1_CUSTOMER_NAME_30A where CUSF1 is the file name and CUSTOMER_NAME_30A refers to a data dictionnary (FRF), you have a nice definition. If the field is a work field, you can replace the file name by WORK1 or by values telling that it is a parameter for a called program or... What do you think about it ? Jacques

                              Comment

                              Working...
                              X