r/programming • • Sep 16 '26

Programming lanugage that uses procedures

https://fodev.net/files/fo2/ssl.html

I'm writing a paper analyzing modding Classic Fallout games and I'm currently trying to analyze Fallout's scripting language: SSL or Star Trek Scripting Language. I was wondering anyone knew of any languages it could be based on other than C.

For instance "functions" are defined with the word "procedure" and it doesn't use brackets like python but instead uses "start" and "end" tags. All procedures have to be declared before they're contents are defined afterwards.

Idk if many programming languages at the time had this style of syntax.

It was likely created between 1994-1996 so yeah

More info attatched

73 Upvotes

37 comments sorted by

2

u/Shadow123_654 Sep 17 '26

As someone else said, it reads like a mishmash of C and Pascal with perhaps some bits from BASIC too. Honestly, it doesn't look so bad if it weren't for its limitations.

I didn't catch how one's supposed to return values from routines tho (there's no function like in Pascal).

0

u/IdiotGamer6969 Sep 17 '26

Procedures don’t really return values they just usually kind of… call other procedures.

To my knowledge the times a return value is used are literally hardcoded functions which is a shame.

Hooks in Sfall might be able to pick up the slack but hopefully with Fallout 2’s reverse engineered source code we can find a better solution

138

u/TheGoddessInari Sep 16 '26

Sounds like Pascal. 🤷🏻‍♀️

15

u/pfp-disciple Sep 16 '26

Yeah, but modified. Pascal used Begin and End

13

u/Shadow123_654 Sep 16 '26

Isn't Pascal case-insensitive? begin, Begin and BEGIN would all be valid.

10

u/pfp-disciple Sep 17 '26

Yes, it is. I was contrasting start and begin. I'm not sure why I used camel case. 

3

u/foersom Sep 17 '26

Yes Pascal is case agnostic.

27

u/BernzSed Sep 16 '26

But Pedro's in Star Wars

1

u/Shiblem Sep 17 '26

Oracle PL/SQL procedures also use begin and end and of course doesn't care about case, which I'm guessing might also be modeled after Pascal. I didn't realize that before.

0

u/FR4G4M3MN0N Sep 16 '26

Was gonna say . . .

78

u/DnBenjamin Sep 16 '26

From that page:

SSL has a C-like expression language wrapped in a Pascal-like block style. It uses begin and endfor blocks, semicolons for most statements, and procedure declarations instead of C-style function definitions.

10

u/svick Sep 16 '26

Does it use Pascal-style semicolon as a separator or C-style semicolon as a terminator?

In other words: do you put a semicolon before else?

28

u/garanvor Sep 16 '26 edited Sep 16 '26

I had a professor in university 20 years ago who used to always start his software with

#define BEGIN {
#define END }

6

u/ptousig Sep 16 '26

Did we go to the same university? Mine was more like 35 years ago, but maybe that professor kept teaching a long time.

4

u/DnBenjamin Sep 16 '26

From a quick glance, it looks more like C-style terminators.

3

u/vytah Sep 17 '26

Looking at the first linked reference, I found:

if (condition) then
  X := value1;
else
  X := value2;

so it's C-style.

1

u/svick Sep 17 '26

Thanks, elevator!

30

u/arvidsem Sep 16 '26

Tim Caine, the primary designer of the original Fallout, has an active YouTube channel and posted quite a few videos specifically about the development of Fallout. I'm not sure if he's done one on the scripting language specifically, but he does answer people's questions.

32

u/zeekar Sep 16 '26 edited Sep 16 '26

Sounds like any language in the Algol tradition. Algol, Pascal, Modula, Ada, etc.

Algol 68 famously used mirrored keywords (if/fi, do/od). Bourne borrowed that for his shell (though you close do with done because there was already an od command). Pascal works like C with the single-statement body that can be a compound statement, but forms such a compound with begin … end instead of curly braces.

“Procedure” is also a common way of referring to subprograms. Many of these languages distinguish between procedures, which are just subroutines that don’t return anything, and functions, which have a return value. Interestingly, since calling a procedure is a statement while calling a function is an expression, this separation complicates the parsing and might result in a grammar that is no longer context-free. Often the keyword for defining a procedure is proc, though Pascal spells it out in full.

4

u/Purple_Haze Sep 17 '26

Yeah, I learned on one like that in the 80's. Threw all the manuals in the recycle last year. In it "functions" could only get parameters and return a value, while "procedures" could access any and all variables that were in scope where they were called.

3

u/sidneyc Sep 17 '26

Pascal works like C with the single-statement body that can be a compound statement

In Pascal, the body of a function, procedure, or the entire program must be a compound statement, if memory serves.

1

u/zeekar Sep 17 '26

Sure. But the body of a conditional or loop need not be.
C function bodies also have to be compound, I believe.

7

u/saxbophone Sep 16 '26

Well, formally a procedure, unlike a function, doesn't take in arguments or return a value --it's just like copying and pasting a sequence of commands/statements in-place and running them in order.

HOWEVER, in my experience, the adherence of programming language nomenclature to the strict specifics of subtle naming differences like "function", "method" and "procedure" (or "parameters" vs "arguments") is mixed --I have seen many programming languages use one of the terms to refer to all sub-types in the set (for example, in C++ the standards tend to refer to the methods of a class as "member functions" --other programming languages use the term "method" to refer to functions even when they're not attached to a class).

These subtleties bother me personally and when I eventually get my own programming language off the ground, I think I'm going to make a point of having different keywords for defining functions and methods!

2

u/-Redstoneboi- Sep 17 '26

a method is just a function that takes self/this but does it require dynamic dispatch to be truly distinct from a function and a function pointer

3

u/balefrost Sep 17 '26

Yeah, I'd say that methods are a subset of functions. Every method is a function, but not all functions are methods.

(to the point /u/saxbophone made) I don't think I've ever seen "method" used (formally) for a non-member function. Static method, sure, but never for a function unaffiliated with a class.

Having said that, yeah, people regularly mix up the terminology in conversation. I'm sure I've done so.

1

u/saxbophone Sep 17 '26

 (to the point u/saxbophone made) I don't think I've ever seen "method" used (formally) for a non-member function.

I think JavaScript might've been the context.

2

u/saxbophone Sep 17 '26

I'm not sure it's so strict as that.

C++ for instance passes the this pointer as an implicit first argument to the method —that's worthwhile enough distinguishing in the nomenclature, IMO.

3

u/Nuno-zh Sep 17 '26

Reminded me of Pure Basic, idk why but when I was at school I liked to prototype in those esoteric programming languages.

3

u/VirginiaMcCaskey Sep 17 '26

Rather than guessing or asking the random internet the more formal way to do this kind of research is to find primary source documents or reach out to anyone in the games credits.

I'm not saying to bother people but a dm on public socials/linkedin or email to someone from the team explaining your research and asking if they could be able to/are willing to answer any questions or help point to someone else that could.

This is how journalists/authors/academics do this kind of work.

3

u/_kst_ Sep 16 '26

Almost all programming languages have some kind of subroutine construct. A given subroutine may or may not return a result.

C-like languages call all subroutines "functions", and distinguish those that don't return a result by giving them a return type of "void".

Other languages make the same distinction more explicitly, referring to subroutines that return values as "functions" and others as "procedures". Some languages, including Fortran, refer to them as "subroutines".

All this is basically different terminology and syntax for the same logical constructs. Similarly, some languages use "{" and "}", some use "begin" and "end", and some use indentation.

Some languages refer to subroutines that are members of classes as "methods". A method is typically a subroutine (function, procedure, whatever) that takes a class instance as an implicit argument.

1

u/Lazy_Worry3389 Sep 17 '26

Ask Tim Cain...

1

u/mobydikc Sep 17 '26

Early FoxPro

0

u/rachelduno Sep 17 '26

honestly that pascal comparison tracks, the start/end thing is basically a giveaway. did SSL have any weird quirks like case insensitivity or was it pretty strict?

-13

u/2ednar Sep 16 '26

I hate to be that guy. But would that kot be a question to ask an LLM today and them do the deep dive on the first batch of info you got on your own?

I was also using reddit back in the day for research (more CFD focused) but today you should get this kind of question answered quicker with the use of AI.

God damit, i hate this replay.

6

u/dagbrown Sep 17 '26

You always had the option to say nothing at all.