Questions tagged [pascal]

For questions regarding the use or installation of the Pascal language on retrocomputers.

Filter by
Sorted by
Tagged with
97 votes
1 answer
29k views

Why did MS-DOS applications built using Turbo Pascal fail to start with a division by zero error on faster systems?

On faster MS-DOS systems, it wasn't entirely uncommon for applications built using Borland's Turbo Pascal to fail to start, and (before exiting back to the command prompt) to report a division by zero ...
user avatar
  • 5,036
38 votes
4 answers
12k views

Where does this esoteric Pascal operator come from?

In the documentation for an implementation of Pascal for a Soviet computer, I've encountered a very weird language extension. I'll try to translate it: Branching operator (branch) Syntax &...
user avatar
  • 16.4k
37 votes
3 answers
6k views

What was the point of Apple Pascal having its own file system?

Apple's UCSD Pascal for the Apple II used its own file system rather than the existing DOS 3.3 of the day. I'm not sure if it overlapped SOS at all, but regardless of timelines it seems that the ...
user avatar
  • 14.3k
34 votes
5 answers
7k views

Why was nil defined as a reserved word in Pascal?

In Pascal, nil (the pointer value to "nothing") is a reserved word. Why wasn't it simply a predefined identifier as true and false are, for example? This is stated in PASCAL User Manual and Report p....
user avatar
32 votes
3 answers
8k views

Was Dennis Ritchie being too modest in this quote about C and Pascal?

In his 1993 conference proceeding The Development of the C Language, Dennis Ritchie stated Successors C and even B have several direct descendants, though they do not rival Pascal in ...
user avatar
  • 14.2k
21 votes
2 answers
4k views

Who invented small string optimization?

In the source code of the 1972 Pascal compiler (a very large OCR-ed PDF), there are declarations of variables and record fields of type ALFA, which are "packed arrays" of 10 characters. ...
user avatar
  • 16.4k
19 votes
6 answers
4k views

What caused the downfall of Pascal? [closed]

From 1985 to 1990 Borland's Turbo Pascal was at least as popular as C for DOS systems. Turbo Pascal was especially popular because of it's ground breaking BGI graphics interface while C was stalled in ...
user avatar
  • 4,311
17 votes
3 answers
1k views

x86 as a Pascal Machine?

From this answer by gsg about the usage of certain x86 instructions: Note that the x86 was originally designed as a Pascal machine, which is why there are instructions to support nested functions (...
user avatar
  • 3,228
16 votes
4 answers
3k views

Why does Pascal have numeric labels?

Pascal was intended, in part, to be a simple language to implement. Some of the design decisions reflecting this are Declarations/definitions must be given in a strict order (labels, constants, types,...
user avatar
  • 3,357
11 votes
1 answer
556 views

How much time and how many people were required to develop Delphi version 1?

I would guess the compiler was primarily a modification of Borland's Turbo Pascal, while the Integrated Development Environment and Visual Component Library required a lot more development from ...
user avatar
  • 111
9 votes
1 answer
2k views

Is this a bug or an allowed Pascal behavior?

Consider the following Pascal program: 1 1 PROGRAM MAIN(OUTPUT); VAR F:TEXT; I:INTEGER; 2 2 BEGIN 3 2 REWRITE(F); 4 3 FOR I := 10 TO 30 DO BEGIN 5 3 WRITELN( I, ’...
user avatar
  • 16.4k
8 votes
2 answers
320 views

How did UCSD Pascal exception mechanism work?

In the UCSD PASCAL II.0 Manual, there is a description (document page 140, PDF page 153) of a peculiar language feature: instead of non-local GOTO statements, as in the Wirth's Pascal, there is ...
user avatar
  • 16.4k
7 votes
1 answer
2k views

Was there a bug in Wirth's original Pascal compiler?

It appears that both legacy Pascal compilers I have access to (for the BESM-6) contain a bug: they would happily produce code for program test(output);(* may have to omit (output) depending on the ...
user avatar
  • 16.4k
7 votes
3 answers
988 views

When were the analogs of the C operators "break" and "continue" introduced in Pascal?

When published in 1970, the Pascal language did not have a way to implement the functionality equivalent to the (future) C language operators "break" and "continue". Their convenience having been ...
user avatar
  • 16.4k
7 votes
1 answer
446 views

Was dynamic type check in Pascal commonplace?

The BESM-6 Pascal compiler I'm experimenting with has a notable difference from Standard Pascal: formal arguments of formal parameters-procedures or functions are not specified, but are checked at ...
user avatar
  • 16.4k
6 votes
2 answers
461 views

Why is the following p-Code generated by the Apple 3 pascal compiler?

On an Apple 3 the following pascal function function randu( High: integer): integer; begin randu:= random mod High end; will be translated to Proc = 06 Typ = P-Code codeBeg = 02A6 Exitcode=...
user avatar
  • 156
6 votes
1 answer
268 views

Cross-Compatibility of UCSD p-Machine Versions?

I currently have Apple Pascal (and Fortran, and PILOT) running on an Apple IIgs emulator on Windows. As near as I can tell, it's UCSD p-System II.something. I also have a DOS-hosted UCSD p-System, IV....
user avatar
  • 1,270
6 votes
0 answers
203 views

Was there another dialect of Pascal with this range checking feature?

I've decompiled yet another Pascal compiler for the BESM-6. While it does not implement the full language (for example, packed records and arrays are not implemented, helper routines SEL and INS are ...
user avatar
  • 16.4k
5 votes
1 answer
896 views

Looking for the source code of a sophisticated Pascal pretty-printing program

I'm trying to find a 70s or very early 80s source code of a Pascal pretty-printing program which is more advanced than the version mentioned on the Prettyprint wiki page which is undated and somewhat ...
user avatar
  • 16.4k
5 votes
1 answer
254 views

How do I read a port value using Turbo Pascal inline code on CP/M?

After successfully using port[0] to read a port value in Turbo Pascal, I thought I'd try to understand how to do this using inline assembly/machine code. I'm able to write to the port (my OutPort ...
user avatar
2 votes
1 answer
336 views

How to transfer file from one disk to another in Apple //e (Applewin)

For the nostalgia, I'm going through Apple Pascal - A Hands-on Approach using AppleWin. There are four disks, pascal0 through pascal3, and for some reason pascal0 is missing a file called SYSTEM....
user avatar