this post was submitted on 02 Jan 2026
541 points (97.9% liked)

Programmer Humor

28345 readers
587 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Slashme@lemmy.world 2 points 2 days ago* (last edited 2 days ago)

Remember that Fortran has an arithmetic if statement. You can write

IF (expression) s1, s2, s3

where s1, s2 and s3 are labels. If the expression is negative, it jumps to s1. If it's 0, to s2 and if it's positive, to s3.

It also has goto variable. You can do

INTEGER a
ASSIGN 20 TO a
ASSIGN 17 TO a
GO TO a
20 PRINT *, "foo"
17 PRINT *, "bar"

and it'll print "bar". In this snippet of code, everything seems quite logical, but imagine debugging spaghetti code written using these patterns.

Oh, it also has

GO TO (s1, s2, ... , sn), N

First, N is converted to an integer. If N is 1, it goes to label s1. If N is 2, it goes to s2. If N is less than 1 or greater than n, it does nothing.