Questions tagged [bcpl]

BCPL (Basic Combined Programming Language) is a procedural, imperative, and structured computer programming language designed by Martin Richards of the University of Cambridge in 1966.

BCPL (Basic Combined Programming Language) is a procedural, imperative, and structured computer programming language designed by Martin Richards of the University of Cambridge in 1966. It is considered a predecessor to and (and a more remote ancestor to , , , and ) and originated several programming language conventions including the use of curly braces to mark code blocks.

Resources

9 questions
7
votes
2 answers

In Objective-C ARC, what are "BPTRs declared within extern "BCPL" blocks"?

In the Clang documentation for ARC, it says: ARC applies to Objective-C pointer types, block pointer types, and [beginning Apple 8.0, LLVM 3.8] BPTRs declared within extern "BCPL" blocks. What are these "BPTRs declared within extern "BCPL"…
user102008
  • 30,736
  • 10
  • 83
  • 104
5
votes
1 answer

BCPL octal numerical constants

I've been digging into the history of BCPL due to a question I was asked about the reasoning behind using the prefix "0x" for the representation hexadecimal numbers. In my search I stumbled upon a really good explanation of the history behind this…
4
votes
3 answers

How could one possibly bootstrap a C compiler(from source)?

I was looking into compiler bootstrapping, and I looked at how Golang implements bootstrapping from source, i.e., by building the last version of Golang implemented in C and using the generated executable to compile newer Go releases. This made me…
Monke
  • 93
  • 6
3
votes
2 answers

Where's some good documentation for creating a GCC front end?

I've been tasked to come up with some half-year and full-year university projects for IT students and, due to the fact that it's hopefully never been done before (and also that I harbor certain sadistic tendencies), one of them is adding a BCPL…
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
3
votes
2 answers

How do I initialize an array of arrays in BCPL?

I tried let stringArr = newvec(12); and then attempted to initialize each spot in the array as such: let stringArr!i = newvec(5); but that returns an error telling me I cannot do that. Is there anyone here who can help me with this dinosaur…
countofmontecristo
  • 381
  • 3
  • 5
  • 15
2
votes
1 answer

In BCPL what does "of" do?

I am trying to understand some ancient code from a DEC PDP10 written in BCPL. A sample of the code is as follows: test scanner()=S.DOTNAME then $( word1:=checklook.up(scan.info,S.SFUNC,"unknown Special function [:s]") …
quentinnuk
  • 195
  • 7
1
vote
2 answers

How to run BCPL under MacOS or Linux

I just googled this question, but what I found is only under windows. Does anyone know how to set up the environment of BCPL under MacOS or Linux?
Wadqq327
  • 11
  • 1
1
vote
2 answers

isdigit function for BCPL

I am currently programming in BCPL for an OS course and wanted to write a simple is_digit() function for validation in a program of mine. A code snippet of my current code follows: let is_digit(n) be { if ((n >= '0') /\ (n <= '9')) then …
User 5842
  • 2,849
  • 7
  • 33
  • 51
0
votes
1 answer

How to write an empty block

How do you write an empty block? For example, in C, you can have { }. But in BCPL, the equivalent $( $) is a syntax error because a block needs at least one statement. So how can you make the following compile? let foo() be $( test bar then $( …
k314159
  • 5,051
  • 10
  • 32