[fpc-devel] On a port of Free Pascal to the IBM 370
Tomas Hajny
XHajT03 at hajny.biz
Wed Jan 18 13:41:58 CET 2012
On Wed, January 18, 2012 13:14, Mark Morgan Lloyd wrote:
> Tomas Hajny wrote:
>
>> is nothing like translation between ASCII and EBCDIC because there are
>> multiple different character sets for both and real conversion isn't
>> possible without taking this into account and knowing the real character
>> sets which again depends on the context which is again not known at this
>> low level). Unless I'm mistaken, this implies that you indeed need to
>> consider the (basic) EBCDIC layout as an alternative to the (basic)
>> ASCII
>
> If the RTL were fully Unicode-aware then possibly this could be handled
> by host localisation, presumably on a classic IBM OS the JCL will state
> unambiguously which variant of EBCDIC is expected.
>
> I think we need to wait for some input from Paul on this one, after all
> he's the project's instigator.
>
>> Not even mentioning the additional "minor" issue with certain characters
>> (critical for Pascal source codes) not necessarily directly available in
>> _some_ (!) EBCDIC character sets as pointed out by Mark - again
>> something
>> which cannot be handled in the general I/O routines because it only
>> becomes important when interpreting a general text as Pascal source code
>> (in this case, special support on the compiler side will be probably
>> necessary, i.e. this should have no impact to RTL, but it will again
>> have
>> impact to the common parts of the compiler, namely scanner, not to
>> target
>> specific units).
>
> I can't remember the source, but my understanding is that Wirth
> originally worked with an IBM 029 keypunch, possibly connected preparing
> decks for a CDC. He specifically defined (* and *) as digraphs for { and
> }, and I think there were others including (. and .) for [ and ] Did FPC
> /ever/ fully-support these?
These should be fine (as easily confirmed by a short test program). I
actually use (* and *) for comments quite often to distinguish from other
comments using { and }. ;-) I'm not aware of a digraph for the caret sign
though which is (as correctly pointed out by you) missing in the EBCDIC
character sets specifically targetting English (and also Portuguese
apparently ;-) ) - it seems to exist in the "International" character
sets.
Tomas
More information about the fpc-devel
mailing list