That feature (Alter GOTO) was also in Fortran, as the, long since
deprecated, assigned GOTO statement. I believe they were there to
support some older computers that didn't have indexed jump/branch >instructions, so achieved the effect by modifying the branch
destination in the instruction itself.
Let's compare this to FORTRAN's assigned goto. <https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9j/index.html>
gives the following example:
ASSIGN 10 TO N
...
GO TO N ( 10, 20, 30, 40 )
...
10 CONTINUE
...
40 STOP
Here N could be a register, the ASSIGN statment loads a constant (the
code address of the label 10) into that register, and the GOTO N
performs a branch to that code address. The labels given in
parentheses limits the possible targets, allowing the compiler to
perform more accurate data-flow analysis and especially limit the
variables which are considered to be alive at the GOTO (I wonder when
the parenthesis part was added).
Why the strange syntax. Why not just write
N = 10
Because the ASSIGN syntax tells the compiler that it is dealing with a
label and not with an integer here, and it can perform the conversion
from label number to code address at compile time instead of having to
look the code address up in a sparse table at run-time. Another
option would have been to introduce a new type for labels, and after declaring N to be a label the assignment above could easily have
produced code for loading the code address. But I guess the ASSIGN
feature was introduced before programming language designers tried to
attack all kinds of problems with types.
call Foo (*100, *200)
....
100
....
200
....
end
subroutine Foo (*, *)
....
return 1 ! Return to callers first * label arg
....
return 2 ! Return to callers second * label arg
....
end
EricP wrote:
call Foo (*100, *200)
....
100
....
200
....
end
subroutine Foo (*, *)
....
return 1 ! Return to callers first * label arg
....
return 2 ! Return to callers second * label arg
....
end
The S.E.L. compiler would produce code equivalent to::
s = foo( )
switch( s )
{
case 1: ...
break;
case 2: ...
break;
}
Then the return statements simple returned the value expressed.
"Stephen Fuld" <[email protected]d> writes:
That feature (Alter GOTO) was also in Fortran, as the, long since deprecated, assigned GOTO statement. I believe they were there to
support some older computers that didn't have indexed jump/branch instructions, so achieved the effect by modifying the branch
destination in the instruction itself.
Fortran's assigned goto directly corresponds to indirect branches on
modern machines, so in 1954 when Fortran was designed, the target
machines for Fortran had such instructions.
The ALTER statement looks somewhat stranger, judging from the example
given at
...
ALTER ALTER-1-EXIT TO PROCEED TO ALTER-2-EXIT
END-IF.
DISPLAY "GO TO ALTER-1-EXIT...." LINE 4 COL 10.
GOTO ALTER-1-EXIT.
ALTER-1-EXIT.
GOTO LABEL-1.
LABEL-1.
DISPLAY "ALTER-1 EXIT!" LINE 10 COL 10.
ACCEPT DUMMY LINE 10 COL 30.
STOP RUN.
ALTER-2-EXIT.
DISPLAY "ALTER-2 EXIT!" LINE 10 COL 10.
ACCEPT DUMMY LINE 10 COL 30.
STOP RUN.
What confuses me is that there is a GOTO right in the ALTER-1-EXIT
section (or is it a procedure?).
So does the ALTER change the "GOTO
ALTER-1-EXIT" and every other occurence of "GOTO ALTER-1-EXIT" that
occurs in the program (as I would expect from the general rule 1. on
the web page linked above; if so, why have the "GOTO LABEL-1" which is followed right by the label "LABEL-1."?
Of is it required that the
given section or procedure starts with a GOTO, and the ALTER statement changes that GOTO?
Let's compare this to FORTRAN's assigned goto. <https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9j/index.html>
gives the following example:
ASSIGN 10 TO N
...
GO TO N ( 10, 20, 30, 40 )
...
10 CONTINUE
...
40 STOP
Here N could be a register, the ASSIGN statment loads a constant (the
code address of the label 10) into that register, and the GOTO N
performs a branch to that code address. The labels given in
parentheses limits the possible targets, allowing the compiler to
perform more accurate data-flow analysis and especially limit the
variables which are considered to be alive at the GOTO
...
ALTER ALTER-1-EXIT TO PROCEED TO ALTER-2-EXIT
END-IF.
ALTER-1-EXIT.
GOTO LABEL-1.
What confuses me is that there is a GOTO right in the ALTER-1-EXIT
section (or is it a procedure?). So does the ALTER change the "GOTO >ALTER-1-EXIT" and every other occurence of "GOTO ALTER-1-EXIT" that
occurs in the program
ASSIGN 10 TO N
...
GO TO N ( 10, 20, 30, 40 )
Why the strange syntax. Why not just write
N = 10
People love to point out that the assigned GOTO has been removed from >Fortran, as a damnation of the concept. But it just tells us that
Fortran programmers don't program the kind of code where this feature
is useful.
According to Anton Ertl <[email protected]>:
People love to point out that the assigned GOTO has been removed from >>Fortran, as a damnation of the concept. But it just tells us that
Fortran programmers don't program the kind of code where this feature
is useful.
It still has computed goto which does the same thing without needing
label variables:
GO TO (10, 42, 30), N
which says if N is 1 goto 10, if 2 goto 42, if 3 goto 30, otherwise
continue.
It has been over 40 years since I wrote any COBOL programs,
and when I was taught it, we were taught to avoid the ALTER
statement ...
It still has computed goto which does the same thing without needing
label variables:
GO TO (10, 42, 30), N
which says if N is 1 goto 10, if 2 goto 42, if 3 goto 30, otherwise
continue.
Don't forget Fortran's alternate returns, indicated by a * in the arg list.
A caller subroutine passes *labels in the args list, and callee decides
which *label-arg it wants to return to in the RETURN statement constant >expression. (This is not ambiguous because in Fortran function return
values are done by assignment to the function name, not the return
statement expression.)
call Foo (*100, *200)
...
100
...
200
...
end
subroutine Foo (*, *)
...
return 1 ! Return to callers first * label arg
...
return 2 ! Return to callers second * label arg
...
end
Rudimentary explicit continuation-passing style at the
dawn of programming languages.
On Sun, 26 May 2024 18:27:32 -0000 (UTC), Stephen Fuld wrote:
It has been over 40 years since I wrote any COBOL programs,
and when I was taught it, we were taught to avoid the ALTER
statement ...
People tend to scream in horror “self-modifying code!”. But really,
all it is, is a clumsy form of switch/case-statement.
EricP <[email protected]> writes:
Don't forget Fortran's alternate returns, indicated by a * in the arg list.
Interesting. Rudimentary explicit continuation-passing style at the
dawn of programming languages.
On Mon, 27 May 2024 08:05:09 GMT, Anton Ertl wrote:
Rudimentary explicit continuation-passing style at the
dawn of programming languages.
Really just a rudimentary form of exception handling. True continuations >would allow you to resume execution within some call frame you had
previously exited.
John Levine <[email protected]> writes:
It still has computed goto which does the same thing without needing
label variables:
GO TO (10, 42, 30), N
which says if N is 1 goto 10, if 2 goto 42, if 3 goto 30, otherwise >>continue.
The computed goto does not do the same thing at all. It performs a
table lookup for translating from N to the code address at run-time
(during the GOTO). You cannot use the computed goto to implement
threaded code, while AFAICS you can use the assigned goto.
Ironically, the gcc maintainers often refer to the labels-as-values
feature of GNU C "computed goto", although it corresponds to assigned
goto. The (GNU) C feature that is closest to the computed goto is
switch, with the difference being that the computed goto is dense by
design while switch may be sparse.
- anton
EricP <[email protected]> writes:
Don't forget Fortran's alternate returns, indicated by a * in the arg
list.
A caller subroutine passes *labels in the args list, and callee decides >>which *label-arg it wants to return to in the RETURN statement constant >>expression. (This is not ambiguous because in Fortran function return >>values are done by assignment to the function name, not the return >>statement expression.)
call Foo (*100, *200)
...
100
...
200
...
end
subroutine Foo (*, *)
...
return 1 ! Return to callers first * label arg
...
return 2 ! Return to callers second * label arg
...
end
Interesting. Rudimentary explicit continuation-passing style at the
dawn of programming languages. Of course, these days it would mean
that you better not use the common call and return instructions,
because the branch prediction for the return would be wrong if return
1 or return 2 would be used. But using plain jump for the call and
indirect jumps for the returns should be efficient on modern CPUs.
- anton
Anton Ertl wrote:
EricP <[email protected]> writes:
Don't forget Fortran's alternate returns, indicated by a * in the arg
list.
A caller subroutine passes *labels in the args list, and callee decides
which *label-arg it wants to return to in the RETURN statement constant
expression. (This is not ambiguous because in Fortran function return
values are done by assignment to the function name, not the return
statement expression.)
call Foo (*100, *200)
...
100
...
200
...
end
subroutine Foo (*, *)
...
return 1 ! Return to callers first * label arg
...
return 2 ! Return to callers second * label arg
...
end
Interesting. Rudimentary explicit continuation-passing style at the
dawn of programming languages. Of course, these days it would mean
that you better not use the common call and return instructions,
because the branch prediction for the return would be wrong if return
1 or return 2 would be used. But using plain jump for the call and
indirect jumps for the returns should be efficient on modern CPUs.
That is why the subroutine returns a value and the return point
implements the switch (control transfer to proper label.
{You DO NOT return to the label, you return normally and then go to the proper label.}
The fact that an ALTER GOTO statement can change where a GOTO
statement branches - without any indication within the GOTO statement
itself that it may have other destinatiions than the primary one -
means that this statement is an obvious method of inserting
malicious code into the source code of a program.
And indeed, given that COBOL is typically used for programs handling financial transactions, I have no doubt that it was so used.
I find this to be an example of incredibly irresponsible language
design.
John Savard wrote:
The fact that an ALTER GOTO statement can change where a GOTO
statement branches - without any indication within the GOTO statement
itself that it may have other destinatiions than the primary one -
But that is not quite true. The GOTO that is to altered must be the
only statement in a paragraph. Since this construction has no other
obvious purpose, its presence gives a clue that it might have been
altered.
means that this statement is an obvious method of inserting
malicious code into the source code of a program.
And note that the paragraph that is the target of the altered GOTO
statement must be within the same program, so any code so executed must
be readily available for inspection.
And indeed, given that COBOL is typically used for programs handling
financial transactions, I have no doubt that it was so used.
Do you have any evidence of this?
I find this to be an example of incredibly irresponsible language
design.
Was it irresponsible in Fortran?
MitchAlsup1 wrote:
Anton Ertl wrote:
EricP <[email protected]> writes:
Don't forget Fortran's alternate returns, indicated by a * in the arg
list.
A caller subroutine passes *labels in the args list, and callee decides >>>> which *label-arg it wants to return to in the RETURN statement constant >>>> expression. (This is not ambiguous because in Fortran function return
values are done by assignment to the function name, not the return
statement expression.)
call Foo (*100, *200)
...
100
...
200
...
end
subroutine Foo (*, *)
...
return 1 ! Return to callers first * label arg
...
return 2 ! Return to callers second * label arg
...
end
Interesting. Rudimentary explicit continuation-passing style at the
dawn of programming languages. Of course, these days it would mean
that you better not use the common call and return instructions,
because the branch prediction for the return would be wrong if return
1 or return 2 would be used. But using plain jump for the call and
indirect jumps for the returns should be efficient on modern CPUs.
That is why the subroutine returns a value and the return point
implements the switch (control transfer to proper label.
{You DO NOT return to the label, you return normally and then go to the
proper label.}
You still could do it by callee loading the arg address to register
and jumping directly there.
If it uses callee stack cleanup then you load the reg and pop the
stack before jumping.
If it uses caller stack cleanup then since caller controls what jump addresses are passed to the callee, caller follows labels 100 and 200
each with stack cleanup code then continues normally.
If it doesn't use a stack at all, as I understand IBM Fortran did,
then it doesn't need cleanup.
I find this to be an example of incredibly irresponsible language
design.
You can use computed goto to do threaded codes when the thread switches
are cooperative (multi-threading).
But now that you have
mentioned exceptions, I wonder whether it is possible to pass a *label
on to another subroutine, and then directly return to a far-out error handler, similar to exceptions. That would require cleaning up the
stack.
On Mon, 27 May 2024 22:40:32 -0000 (UTC), "Stephen Fuld" <[email protected]d> wrote:
John Savard wrote:
I find this to be an example of incredibly irresponsible language
design.
Was it irresponsible in Fortran?
I don't understand that question. FORTRAN contained no such language construct.
It had the computed GOTO and the assigned GOTO.
Now, there was also the assigned GOTO, and in a way one could
say that it was "closer" to what COBOL had.
The assigned GOTO was:
GOTO LABEL,(1035,1045,1065)
and somewhere else you would say something like
ASSIGN 1045 TO LABEL
Although this performed the same functionality as the ALTER
GOTO statement in COBOL was intended for, an assigned GOTO
still obviously had multiple different destinations, based on what
was assigned to the variable LABEL somewhere else.
What was irresponsible about ALTER GOTO was that if such a
thing existed in FORTRAN, one would have
GOTO 12
and
ALTER GOTO 12 TO 23
somewhere else. Now that would give no indication of its
presence, and it would thus be wholly confusing.
John Savard wrote:
I find this to be an example of incredibly irresponsible language
design.
Was it irresponsible in Fortran?
Stephen Fuld wrote:
John Savard wrote:
I find this to be an example of incredibly irresponsible language
design.
Was it irresponsible in Fortran?
What appears irresponsible in 2024, with 5GHz CPUs and TBs of main
memory internet connected and used not for computing but for
leisure, is not what would look irresponsible with 5Khz CPUs with
64KB of main memory and no outside communications.
The fact that an ALTER GOTO statement can change where a GOTO
statement branches - without any indication within the GOTO statement
itself that it may have other destinatiions than the primary one -
means that this statement is an _obvious_ method of inserting
malicious code into the source code of a program.
And indeed, given that COBOL is typically used for programs handling financial transactions, I have no doubt that it _was_ so used.
I find this to be an example of incredibly irresponsible language
design.
As I said before, you could easily scan the source code ...
Anton Ertl wrote:
You cannot use the computed goto to implement
threaded code, while AFAICS you can use the assigned goto.
You can use computed goto to do threaded codes when the thread switches
are cooperative (multi-threading).
On Tue, 28 May 2024 04:06:42 -0000 (UTC), Stephen Fuld wrote:
As I said before, you could easily scan the source code ...
Who could? Remember code was on punch cards in those days, and editors did >not provide any kind of useful search/replace functionality. So all >“scanning” would have been done by fallible human eyeballs.
As I said before, you could easily scan the source code and find all
the ALTER statements ...
According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and find all
the ALTER statements ...
Hm, I'm guessing you've never dropped a box containing 2000 source
cards.
COBOL dates from about 1960, while online text editors, as opposed to
coding forms and keypunches, didn't become common until the 1970s and
in some places even later.
It really mattered that it was obvious that a Fortran assigned GOTO
could go anywhere, but in COBOL an altered GOTO looked just like an
unaltered one.
Dunno why COBOL didn't have label variables instead. It wouldn't
have been any harder.
John Levine wrote:
According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and find all
the ALTER statements ...
Hm, I'm guessing you've never dropped a box containing 2000 source
cards.
I have (remember using a marker to put a diagonal line across the top
of the deck to make it easier to spot an out of order card? :-(. But
that isn't the point. When I said scan, I was referring to the paper >listings that, in the day, were easily available.
"Stephen Fuld" <[email protected]d> writes:
John Levine wrote:
all >> > the ALTER statements ...According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and find
Hm, I'm guessing you've never dropped a box containing 2000 source
cards.
I have (remember using a marker to put a diagonal line across the
top of the deck to make it easier to spot an out of order card?
:-(. But that isn't the point. When I said scan, I was referring
to the paper listings that, in the day, were easily available.
We always used the sequence number field with COBOL, so the
deck could be sorted using a card sorter if dropped.
Scott Lurndal wrote:
"Stephen Fuld" <[email protected]d> writes:
John Levine wrote:all >> > the ALTER statements ...
According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and find
Hm, I'm guessing you've never dropped a box containing 2000 source
cards.
I have (remember using a marker to put a diagonal line across the
top of the deck to make it easier to spot an out of order card?
:-(. But that isn't the point. When I said scan, I was referring
to the paper listings that, in the day, were easily available.
We always used the sequence number field with COBOL, so the
deck could be sorted using a card sorter if dropped.
Good point. I had forgotten about that.
Stephen Fuld <[email protected]d> schrieb:
Scott Lurndal wrote:
find >> all >> > the ALTER statements ..."Stephen Fuld" <[email protected]d> writes:
John Levine wrote:
According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and
source >> >> cards.
Hm, I'm guessing you've never dropped a box containing 2000
referring >> > to the paper listings that, in the day, were easily
I have (remember using a marker to put a diagonal line across the
top of the deck to make it easier to spot an out of order card?
:-(. But that isn't the point. When I said scan, I was
available. >>
We always used the sequence number field with COBOL, so the
deck could be sorted using a card sorter if dropped.
Good point. I had forgotten about that.
The ISPF editor used to add these automagically, without them being
visible, for FB80 files.
Worked great the first time I tried to run LaTeX, which was on a
mainframe... I could not make heads or tails of the error messages.
Thomas Koenig wrote:
Stephen Fuld <[email protected]d> schrieb:
Scott Lurndal wrote:find >> all >> > the ALTER statements ...
"Stephen Fuld" <[email protected]d> writes:
John Levine wrote:
According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and
source >> >> cards.
Hm, I'm guessing you've never dropped a box containing 2000
referring >> > to the paper listings that, in the day, were easily
I have (remember using a marker to put a diagonal line across the
top of the deck to make it easier to spot an out of order card?
:-(. But that isn't the point. When I said scan, I was
available. >>
We always used the sequence number field with COBOL, so the
deck could be sorted using a card sorter if dropped.
Good point. I had forgotten about that.
The ISPF editor used to add these automagically, without them being
visible, for FB80 files.
Worked great the first time I tried to run LaTeX, which was on a
mainframe... I could not make heads or tails of the error messages.
See what problems you get when you use that newfangled technology!
:-)
*Real* programmers used actual punched cards! :-)
Scott Lurndal wrote:
"Stephen Fuld" <[email protected]d> writes:
John Levine wrote:all >> > the ALTER statements ...
According to Stephen Fuld <[email protected]d>:
As I said before, you could easily scan the source code and find
Hm, I'm guessing you've never dropped a box containing 2000 source
cards.
I have (remember using a marker to put a diagonal line across the
top of the deck to make it easier to spot an out of order card?
:-(. But that isn't the point. When I said scan, I was referring
to the paper listings that, in the day, were easily available.
We always used the sequence number field with COBOL, so the
deck could be sorted using a card sorter if dropped.
Good point. I had forgotten about that.
Hm, I'm guessing you've never dropped a box containing 2000 source
cards.
As I said before, you could easily scan the source code and find all
the ALTER statements and create a list of the potential targets similar
to the list in parentheses in Fortrans equivalent functionality. So
your objection is that the possible targets are not listed in one place?
Jo so while
the GOTO statement itself was syntactically identical to a non
ALTERable GOTO, the fact that it was in a paragraph by itself made it
unique in the source code listing.
This is why the source code didn�t go beyond column 72: so that the last 8 >columns could be used for a sequence number.
On Tue, 28 May 2024 04:06:42 -0000 (UTC), "Stephen Fuld" <[email protected]d> wrote:
As I said before, you could easily scan the source code and find all
the ALTER statements and create a list of the potential targets similar
to the list in parentheses in Fortrans equivalent functionality. So
your objection is that the possible targets are not listed in one place?
My objection is that the GOTO statement affected by the ALTER GOTO
does not have a form which clearly and unambiguously indicates that it
is potentially alterable by an ALTER GOTO statement.
It looks just like an ordinary GOTO statement to which no ALTER GOTO statement has been applied.
Surely that should be obvious.
It isn't
GOTO THAT-LABEL OR MAYBE SOMEWHERE ELSE
it's just
GOTO THAT-LABEL
but that isn't really what it means.
What has to be "in one place" isn't necessarily all the possible
destinations (although that would be very helpful) but the fact of
alteration being a possibility, which is an unusual thing not normally applicable to a GOTO.
John Savard
It would have a similar effect if it allowed
i = 42
and then elsewhere it said "alter 42 to 17".
I can see company coding standards banning this feature,
not because it might be abused, but because even when used as
intended it would be a nightmare for code maintenance.
John Savard wrote:
The fact that an ALTER GOTO statement can change where a GOTO
statement branches - without any indication within the GOTO statement
itself that it may have other destinatiions than the primary one -
means that this statement is an _obvious_ method of inserting
malicious code into the source code of a program.
And indeed, given that COBOL is typically used for programs handling
financial transactions, I have no doubt that it _was_ so used.
I find this to be an example of incredibly irresponsible language
design.
How is this different from having jump/call tables in any other
language, or just a standalone trampoline/indirect jump?
Under the hood, more or less the exact same thing happens: If you can
reach and modify the jump table, then you can insert your new functionality/malware before branching back to the original target.
My objection is that the GOTO statement affected by the ALTER GOTO does
not have a form which clearly and unambiguously indicates that it is potentially alterable by an ALTER GOTO statement.
On Wed, 29 May 2024 04:53:26 -0000 (UTC), Lawrence D'Oliveiro
<[email protected]d> wrote:
This is why the source code didnt go beyond column 72: so that the last 8 >>columns could be used for a sequence number.
The cards were 80 columns wide because this improved on the old 45
column cards, allowing more information to be stored per card when
used with tab equipment.
Then the IBM 704 computer came along, which had a 36 bit word length.
IBM, in its infinite wisdom, decided that computer users, unlike tab equipment users, could get by without being able to use the whole
card. So they made their card reader read the card by rows, with the
holes in the first 36 columns going in one word, and the holes in the
next 36 columns going in the next word.
Thomas Koenig wrote:
See what problems you get when you use that newfangled technology!
:-)
*Real* programmers used actual punched cards! :-)
Stephen Fuld wrote:
Thomas Koenig wrote:
See what problems you get when you use that newfangled technology!
:-)
*Real* programmers used actual punched cards! :-)
BTDT, never want to go back.
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Good riddance!
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do to determine the length of the string was subtract column numbers?
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do to >determine the length of the string was subtract column numbers?
Lawrence D'Oliveiro <[email protected]d> writes:
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do
to determine the length of the string was subtract column numbers?
Aside the fact that you needed to know the length _before_ you punched
the rest of the "very long text string" on the card? Or are you
suggesting that coding forms (which were used for third party punching)
were a prerequisite for punching program cards?
Lawrence D'Oliveiro wrote:
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:Hey, did you not read what I wrote about this being hand-punched cards?
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do
to determine the length of the string was subtract column numbers?
By the time I got to the end of the string it was too late to go back
and update the 27H count.
On Mon, 03 Jun 2024 14:11:46 GMT, Scott Lurndal wrote:
Lawrence D'Oliveiro <[email protected]d> writes:
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do
to determine the length of the string was subtract column numbers?
Aside the fact that you needed to know the length _before_ you punched
the rest of the "very long text string" on the card? Or are you
suggesting that coding forms (which were used for third party punching)
were a prerequisite for punching program cards?
Of course people used coding forms.
On Mon, 3 Jun 2024 10:33:32 +0200, Terje Mathisen wrote:
Lawrence D'Oliveiro wrote:
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:Hey, did you not read what I wrote about this being hand-punched cards?
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do
to determine the length of the string was subtract column numbers?
By the time I got to the end of the string it was too late to go back
and update the 27H count.
Card-punch machines had an option for that too, didn’t they? Certainly the
IBM 129 that I used could do that: copy the card to a new card, up to but
not including the incorrect part, then enter the correction, then copy the rest of the card.
Lawrence D'Oliveiro wrote:
On Mon, 03 Jun 2024 14:11:46 GMT, Scott Lurndal wrote:
Lawrence D'Oliveiro <[email protected]d> writes:
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:
This was using hand-punched cards, writing FORTRAN 2 code with the
Hollerith text constants so you had to count very carefully:
FORMAT 27HTHIS IS A VERY LONG TEXT STRING...
Hey, did you not notice the columns were numbered? So all you had to do >>>> to determine the length of the string was subtract column numbers?
Aside the fact that you needed to know the length _before_ you punched
the rest of the "very long text string" on the card? Or are you
suggesting that coding forms (which were used for third party punching)
were a prerequisite for punching program cards?
Of course people used coding forms.
Do you insist on not reading what we write?
I hadn't even heard of coding forms until now, almost 47 years later.
Yes, they would have made sense back then but what I had was notebooks
with a raster (5mm step?) background.
Lawrence D'Oliveiro wrote:
On Mon, 03 Jun 2024 14:11:46 GMT, Scott Lurndal wrote:
Lawrence D'Oliveiro <[email protected]d> writes:
On Thu, 30 May 2024 10:15:54 +0200, Terje Mathisen wrote:Aside the fact that you needed to know the length _before_ you punched
the rest of the "very long text string" on the card? Or are you
suggesting that coding forms (which were used for third party
punching)
were a prerequisite for punching program cards?
Of course people used coding forms.
Do you insist on not reading what we write?
I hadn't even heard of coding forms until now, almost 47 years later.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 10:21:15 |
| Calls: | 12,100 |
| Files: | 15,003 |
| Messages: | 6,517,978 |