[Info-vax] BASIC (and Horizon)

Arne Vajhøj arne at vajhoej.dk
Mon Jan 29 20:02:35 EST 2024


On 1/29/2024 7:50 PM, kludge at panix.com wrote:
> =?UTF-8?Q?Arne_Vajh=C3=B8j?=  <arne at vajhoej.dk> wrote:
>> The code is VB6.
>>
>> But none of the problems are Basic specific. It is possible
>> to write the same bad code in C or Fortran or whatever.
>>
>> So it just shows that there are some really really bad programmers out
>> there.
> 
> I have worked with people who could write spaghetti Fortran in any
> programming language available.

"A real Fortran programmer can write Fortran in any language"

Every time this comes up I post this Fortran/Pascal code:

       PROGRAM GOTOFUN(INPUT,OUTPUT);
       LABEL L731,L113,L247,L588,L761,L922,L399,L601;
       VAR LBL:INTEGER;
       VAR I:INTEGER;
       BEGIN
L731: GOTO L113;
       LBL:=399;
L113: I:=0;
       WRITELN(I);
L247: LBL:=601;
       IF(I<0)THEN GOTO L588 ELSE IF(I=0)THEN GOTO L922 ELSE GOTO L399;
L588: I:=I+1;
       WRITELN(I);
       GOTO L399;
L761: CASE(LBL)OF 399: GOTO L399; 601: GOTO L601; END;
L922: I:=I+1;
       WRITELN(I);
       CASE(I)OF 1: GOTO L588; 2: GOTO L399; 3: GOTO L922; END;
L399: GOTO L761;
L601: END.

:-)

Arne




More information about the Info-vax mailing list