+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 44

Thread: Free Form

  1. #1

    Default Free Form

    That's BASIC style, Tom. I think the languages we would want RPG to look similar to are Java and it's C family of predecessors. They have semicolons or braces after each statement, like /free. In my opinion that's a good thing to be similar. In addition, as I post every so often, the open brace should be allowed (actually, encouraged) after block statements like DOU and replaced by the compiler with a ; when parsing the line, and the closing brace encouraged and replaced with an END; by the compiler. There's no reason to have a different standard than the standard. By the same token, == and != for comparisons, and break and continue for loops should be handled as equivalents by the compiler. The multiple statements across a line is a nightmare. I can just see debugging that now. rd

  2. #2

    Default Free Form

    Gak!
    the languages we would want RPG to look similar to are Java and it's C family of predecessors.
    C style would be a disaster, IMHO! C has a lot of power, and many pitfalls. The aim is clarity, and in this C is lacking. Currently RPG allows only one statement per line, so why require the programmer to type a character indicating end of statement? Most statements are not multi-line statements. The common case should be the easiest to express. Tom D.

  3. #3

    Default Free Form

    Hey Ralph, Thanks for the reply... in fact you where the only one to reply! Didn't mean to jump on you, I let my dislike of C get ahead of me. I was kinda hoping others would chime in. Not that I really expect anything to change, but just to kick it around anyway. Tom D.

  4. #4

    Default Free Form

    If I had liked C, my career would have taken a drastically different direction long ago, before I got on the /400. But I like Java. In any event, they share a heritage of semi-colons ending statements, and line terminations being mere white space to ignore. But speaking of C, an interesting thing I saw in some RPG example code recently was pointer math, one of the things taken away from C's heritage in Java. I doubt that those who don't think much of RPG knows RPG has pointers, much less capability to manipulate it. On the other hand, there was good reason it isn't in Java. rd

  5. #5
    Guest.Visitor Guest

    Default Free Form

    Readability comes from good naming conventions for procedures, variables, and formatting. Multiple statements on the same line can be a good thing. If not %found; sendmessage('Not Found'); End If; Continuation characters eliminate the 'Free' in Free-Format. Continuation characters are for line based programming languages. Free-Format means formatting doesn't affect program execution. In Free-Format RPG when working with text, I often find I have a single assignment fill 5 lines. Putting continuation characters at the end of each would be a pain.

  6. #6
    Guest.Visitor Guest

    Default Free Form

    Another suggestion is to have the possibility to have source lines greater than 80 chars. Splitted code lines because of the 80 chars limit are harder to read and a pain to code. This way, continuation char would be almost obsolete.
    Code

  7. #7
    rharman@knotts.com Guest

    Default Free Form

    I don't mind the semi-colon after a statement, but after an if, else, endif, etc. drives me nuts. I'd like to see more C-like constructs available - like... multiple assignments.... a = b = c = d = f = somevalue; assign and compare.... if (( x = somefunction( arg1 : arg 2 )) == somevalue ); Multiple statements on a single line would be helpful in some cases too. and... a ternary operator. x = (( a < b ) ? c : d );

  8. #8

    Default Free Form

    reminds me of my cobol days in college...the second program i wrote in that class, was written in basic. it read each line and "interpeted" (somewhat reliably) where the end of the statement was and placed a period at the end. -bret

  9. #9

    Default Free Form

    Roger wrote: "I'd like to see more C-like constructs available" Then write your programs in C.

  10. #10
    SoftwareTrend Guest

    Default Free Form

    We have C#, C++, and Java all based on a pre-80s structure that is so-o-o easy to make very complicated (braces everywhere) and so lacking in programmer support (case sensitive - they are joking!). And this is the model for RPG????!! Hell throw in the MVC model and lets see the development times for a simple app blow out to weeks - and then be offshored to make them cheaper again. Tony (OP) was right - VB was the best language syntax to go with although a simple SQL type variation with statement terminators would have been good as well. And don't come the rubbish offered by IBM about the compiler complexity - MS and the SQL vendors seem to have worked it out easy enough - in fact MS's compilers are so fast that on the fly compilation is not a big issue within ASP.NET. Ron

+ Reply to Thread
Page 1 of 5 1 2 3 ... LastLast

Similar Threads

  1. Free form SQL in RPG
    By PatLandrum in forum RPG
    Replies: 6
    Last Post: 08-15-2007, 05:12 AM
  2. Mod Marks in Free Form?
    By Guest.Visitor in forum RPG
    Replies: 5
    Last Post: 06-24-2005, 04:59 AM
  3. Free Form RPG
    By Guest.Visitor in forum RPG
    Replies: 4
    Last Post: 07-25-2003, 08:19 PM
  4. MOVEA in free form?
    By dolfan in forum RPG
    Replies: 8
    Last Post: 07-25-2003, 12:23 PM
  5. klist in free form RPG
    By Guest.Visitor in forum RPG
    Replies: 1
    Last Post: 02-12-2002, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts