×
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.
But, C has braces surrounding the content and requires parens around the condition. PL/I can only have a single statement following an IF or an ELSE, and requires a THEN after the IF. There are a lot of ways this syntax plays out. Heck Python requires that the content of the if block be indented just right. And PHP uses braces like C, but if you don't like the braces the alternative syntax is to use a colon (:).
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----John Yeung <gallium.arsenide@xxxxxxxxx> wrote: -----
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
From: John Yeung <gallium.arsenide@xxxxxxxxx>
Date: 07/19/2016 05:14PM
Subject: Re: RPG
On Tue, Jul 19, 2016 at 4:56 PM, Vernon Hamberg
<vhamberg@xxxxxxxxxxxxxxx> wrote:
Crazy quirks? (See John's statement below) Semicolons?
Let's see, languages like C, Pascal, Algol, Ada, PL/I, et al, used
semicolons to indicate the end of a line - and Javascript today can use them
although optional, last I looked.
Not so crazy anytime, methinks!
No, you have missed my point entirely. None of those languages
requires semicolons FOR THE IF AND ELSE STATEMENTS.
And THAT is where I keep forgetting them in free format RPG.
(Similarly for other block-opening statements.)
At the time that I was first learning RPG, my single favorite and most
comfortable language was C. My favorite and most comfortable language
before that was Pascal. So trust me, the requirement for semicolons ON
THOSE LINES is very, very disorienting, awkward, ugly, and hard to
force yourself to do.
John Y.
As an Amazon Associate we earn from qualifying purchases.