Hot answers tagged

59

The definition of PASCAL is, above all else, intended to be simple. PASCAL was designed as a pedagogical language (with aspirations to be useful for commercial purposes, but that was a secondary concern). For this purpose, the definition had to be small and orthogonal so that it could be explained simply and concisely. For ease of implementation, the ...


37

Was Ritchie correct, or was he just being modest? I’m not sure modesty plays a part here; I don’t see any statement of value attached to the size of a language’s family. As of the date of the quote (1993), were more computer languages descended from Pascal than C? Yes, he was correct, at least as phrased in the paper. Perceptions are perhaps biased ...


37

UCSD Pascal was a product of UCSD - The University of California at San Diego. It was not a product of Apple. UCSD Pascal was available on a number of machines, including the PDP-11, TI99/4, the BBC Micro and the IBM PC. It was a noble attempt to produce a fully cross-platform language. UCSD Pascal used a disk filing system that was intended to be ...


26

I think it’s worth looking at the rise of Turbo Pascal (in particular) to understand its “downfall”. When Turbo Pascal was released, it has a number of advantages over the competition, regardless of programming language: it was fast, it produced (reasonably) fast programs, it came with excellent documentation, it included a full development environment with ...


24

UCSD Pascal was developed prior to the Apple II, during the 70's in San Diego, using PDP-11 class machines with a 512-byte block disk structure. In the process of porting it to microcomputers, often (not always) the file system also got ported. UCSD Pascal was seen as a closed environment offering everything in one place. Today we might call this an IDE ...


19

Unlike Boolean constants, the value of NIL cannot be assigned a particular type. That's why it has to be parsed in a special way, that is, it has to be a keyword. Another reason for NIL to be a keyword is to disallow explicitly dereferencing NIL by writing NIL@. If NIL were a predefined constant of any pointer type, even a magic polymorphic pointer, it ...


13

Delphi 1.0 was released Feb 14, 1995. By my (now somewhat foggy) recollection, research / experimentation that directly contributed to defining the Delphi visual development experience started around 1992. The research group included some folks who had previously worked at Xerox Parc Place on human-machine interface design and theory, as well as the Turbo ...


11

What exactly does it mean to be a "Pascal machine" in that context? It's close but not really the case. It starts with the term Pascal Machine being misused, as this usually describes a software and/or hardware to interpret p-code; today we would call it bytecode, like the Pascal Microengine or a p-code interpreter. This virtual machine was called by its ...


11

From personal communication with Adam Sampson: I think it's fairly likely that the designers of your 1979 dialect of Pascal were thinking of this as a feature to support (what was then called) "backtrack programming" for AI-like applications, rather than as an exception handling mechanism... There were several programming languages ...


10

I don't think the answer is very complicated, but the scope and time-frame of the transition was much bigger than you indicate. This wasn't so much about what was happening in DOS/PC programming as it was about the slow but steady unification of scientific computing and mainstream/business computing. The C Language, along with the Unix OS, grew to dominate ...


8

They probably meant Landin's J operator, which is basically a precursor to the call-with-current-continuation function from Scheme. See the relevant part of Racket documentation.


7

Short Answer: Yes Was Ritchie correct, or was he just being modest? As of the date of the quote (1993), were more computer languages descended from Pascal than C? (*1) Well, it's not as easy as it sounds, as there is no birth certificate with all parents named. Both languages are Algol descendants. And throughout the 1980s Pascal was seen as the way to ...


7

It is difficult to say for sure, because there have been a lot of implementations of the Pascal Language (some of them not very widely distributed), each with their own specific additions to the language. Anyway, my researchs show that it is very unlikely that a feature like the one you describe have been made available before 1979: The Turbo Pascal ...


6

I suspect it was, at least in part, due to the offerings from Microsoft getting a lot better. MFC was launched in 1992, I believe, and that, combined with C++, made a huge difference in productivity, compared to the painful old world of C and Windows API. Also, Visual Basic arrived in 1991, although it was widely available before then in beta, and that made ...


6

How can I recognise in the p-Code, that this is an integer function and has not 3 parameter values (6 bytes = 3 words data). Has not? To be honest, I'm a bit confused about what you're asking. So here are my two (no, not cents) possible interpretations of this question. If it's about how many parameters a function has: In p-code functions always have (at ...


6

At the time he wrote that, it would have been literally true. Concurrent Pascal, *Pascal, SUE (which I'd like to know more about), Modula (not Modula-2), Modula-2, Mesa, Modula-3, Euclid, Concurrent Euclid, Turing, Turing+, the Gypsy specification language, LIS (another one I'd like to know more about), and arguably CLU. Those are just ones I can call to ...


5

Pascal compilers/runtimes typically do some (very often, optionally, enabled by a flag) run-time type checking. A very typical run-time check supported by most Pascal compilers is array bounds checking, because it is the most common type-related mismatch error in Pascal programs and bounds of actually used array indices are very hard to check at compile time ...


4

You should download and use CiderPress which is a Swiss Army Knife tool for Apple disk images - It understands and supports the UCSD Pascal file system format and should be able to transfer a file from one disk image to the other.


4

Pascal for the Apple /// actually used the SOS file format and was compatible with files written by Business Basic. SOS was adapted into ProDOS for the Apple II-series machines, but Pascal /// was never ported to it to my knowledge. And, yes, it's a darn shame Pascal and the other UCSD languages FORTRAN, BASIC, and MODULA/2 couldn't run together.


4

Because neither 0 nor false is a pointer. Pointers are pointers and not numeric values that can be used in directly in mathematical expressions. Assigning false to a pointer doesn't make any sense so Pascal assigns nil to it. Talking about "sense" there's a famous example in C++ where previously pointers were generally compared with the literal 0 or macro ...


3

null pointer has a value reserved for indicating that the pointer does not refer to a valid object Wikipedia is having good explanation of it. Thus null, or nil, is a value of pointer, chosen by the compiler, which, by default, is not valid within current application environment, or is not reachable by the user code. Why this word "nil" ever exists? For ...


2

The singular problem with Pascal in contrast to C was that C is a much more generic language than Pascal with a more flexible typing system. In Pascal, notably, I/O is a first class concept, with direct, and "special", support in the language. The original Pascal typing system wasn't flexible enough to handle outliers such the I/O system which need to ...


2

One factor leading to the downfall of Pascal is that even though the major Pascal vendors on the PC and Macintosh both extended Wirth's language in similar ways, there was never any kind of "official" standard. By contrast, a document was published around 1989 which called itself an official standard for C, even though its quality as a "standard" (a ...


2

If you look at the return code in the function above "RNP 01" stands for "return from nonbase procedure and return 1 word as a function result. Therefore this must be an integer/scalar/boolean function. As already mentioned by @Raffzahn the compiler always assigns 2 null bytes as extra parameters for any function. This function has 3 data words: loc1 = ...


1

One difference between Pascal and the C language as commonly implemented in the days before standardization is that every user-defined Pascal function will always be passed with a fixed set of arguments, while C functions might sometimes be passed more and sometimes fewer, and there was no need for a function to indicate, even retrospectively, how many ...


1

Pascal was notable at the time for having nested scopes. You code have, for example: program test; var t : integer; procedure p1(x:integer); function f1(y:integer) : integer; begin f1 := x + y; end; begin t := f1(10); end; begin f1(6); writeln(t); end. So, you can see here that in f1, there are 3 variables in scope: y (from ...


1

Pascal was the implementation language for the Accent operating system and, for most of the user-mode software that ran on PERQ workstations in the 1980s. Except... ...It wasn't Pascal, it was PERQ Pascal which was enhanced in ways that made it significantly more friendly to software developers, while possibly making it harder for computer science profs to ...


1

There are excellent answers in this thread. The clearest answer is that nil cannot be a value because it has no type. Whereas true and false are understood to be values of enumerated, ie., type boolean = (false, true); What type of pointer would nil be an instance of? Recall pointer definitions are: type p = ^integer; nil, if it is a value, is ...


1

From the beginning Pascal has always had a goto statement. So while it didn't have explicit break and continue, they were trivially easy to emulate: while someCondition do begin 2: (* do some stuff *) goto 1; (* Equivalent to break *) (* do some more stuff *) goto 2; (* do even more stuff *) end; 1: break and continue are more ...


1

Given the revised description, it appears that the intention was to provide an ability to exit inner blocks of code in a manner somewhat analogous to setjmp/longjmp. Basically, something like: branch 6 of doX; doY; doZ; End would be somewhat analogous to the C code: extern jmp_buff back_jmp_buff; extern int jmp_cause; jmp_buff volatile ...


Only top voted, non community-wiki answers of a minimum length are eligible