Microsoft open sources GWBASIC

Chuck Guzis cclist at
Mon Jun 1 00:35:44 CDT 2020

On 5/31/20 3:13 PM, Eric Korpela via cctalk wrote:
> Most languages will give you some way to shoot yourself in the foot.  The
> question is how much work do you need to do?  In FORTRAN the easiest method
> was changing the value of a literal in a subroutine call.  It is standard
> compliant behavior that goes back to at least FORTRAN IV.  

One of the reasons that the F90 standards people got very strict about
vendor "features" (must not be allowed as the default) was that they
were often added as a "good idea" without a lot of thought.

I recall one from the CDC 6000 FORTRAN IV extended product that got
everyone thinking.   Instead of counting the number of characters in a
hollerith constant as used in a FORMAT, some clever boots decided that
"Hdxxxxxd", where xxxxx is the character string and d is any printable
character that forms a delimiter would be a really neat feature.   Thus,
H*HELLO* has exactly the same meaning as 5HHELLO when used in a FORMAT

One day a PSR rolled in with the following question:

Given the program segment shown below, what does it do?
	HX = 1
        X = 2
100	FORMAT(HX)=(-X)

Observe that FORTRAN has no reserved words (that changed in F90) and
spaces are ignored unless part of a hollerith constant.

Well, it might be an assignment to an element of the array FORMAT--or,
it might be a FORMAT statement for an I/O operation (FORTRAN does not
disallow unreferenced FORMAT statements).

Clearly, if there were an I/O statement (e.g. READ or WRITE) referencing
label 100, the meaning was obvious.   Otherwise, meh.

There was no way to "fix" the problem other than to say "Don't be silly".


More information about the cctalk mailing list