× 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.



On 20-Jul-2016 09:38 -0500, Raul A Jager W wrote:
<<SNIP>> Other "funny" thing in RPG is the use of "colon" between
parameter or indexes, and that is because in "the rest of the world"
the comma is used to mark the decimals. In other languages we must
adopt the "decimal point" when writing programs.

Perhaps the choice of colon (:) as delimiter is "funny" [meaning unusual or strange, not meaning humorous] to some people, but that choice is quite "sensible" [meaning logical and intelligent], to those for whom making considerations for the /global/ nature of programming is important. While IBM has [and many others have also] made some notably poor decisions in programming languages, with regard to the topic of /globalization/, that specific choice of colon over comma in RPG is a clear winner.

Too bad the originators of the SQL did not make a similarly sensible choice, so that irrespective the locale of the programmer, requests like VALUES(1,2) would be unambiguous. Sadly, most people in the USA who actually know what that values-construct is, probably think that particular example usage is unambiguous :-( Those same people do not realize that when their code is properly copied, *identically* [with necessary CCSID conversions], that the effects experienced by whomever copies can be quite different, depending on whom and whence is the programmer making that copy, despite their use of an identical compiler and run-time.

FWiW: With an "other" language, specifically the DB2 for i SQL, the comma as decimal separator is allowed generally, with a configurable option; i.e. there is no requirement for a coder with preference of comma-as-decimal-point to code the period-as-decimal-point in their numeric literals. Even so, the SQL parser still demands effectively, that every comma that is not a decimal-separator should be further punctuated by a blank\space when abutting a digit; that is because, there is no configurable option to choose an alternative to the comma as the default token-delimiter.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.