443:. All data shared between different compilation units comprises scalars and pointers to vectors stored in a pre-arranged place in the global vector. Thus, the header files (files included during compilation using the "GET" directive) become the primary means of synchronizing global data between compilation units, containing "GLOBAL" directives that present lists of symbolic names, each paired with a number that associates the name with the corresponding numerically addressed word in the global vector. As well as variables, the global vector contains bindings for external procedures. This makes dynamic loading of compilation units very simple to achieve. Instead of relying on the link loader of the underlying implementation, effectively, BCPL gives the programmer control of the linking process.
300:
41:
772:
397:, a fixed number of bits, usually chosen to align with the architecture's machine word and of adequate capacity to represent any valid storage address. For many machines of the time, this data type was a 16-bit word. This choice later proved to be a significant problem when BCPL was used on machines in which the smallest addressable item was not a word but a
844:
GET "LIBHDR" GLOBAL $ ( COUNT: 200 ALL: 201 $ ) LET TRY(LD, ROW, RD) BE TEST ROW = ALL THEN COUNT := COUNT + 1 ELSE $ ( LET POSS = ALL & ~(LD | ROW | RD) UNTIL POSS = 0 DO $ ( LET P = POSS & -POSS POSS := POSS - P TRY(LD + P << 1, ROW + P, RD + P >> 1)
722:
Martin
Richards maintains a modern version of BCPL on his website, last updated in 2023. This can be set up to run on various systems including Linux, FreeBSD, and Mac OS X. The latest distribution includes graphics and sound libraries, and there is a comprehensive manual. He continues to program in
446:
The global vector also made it very simple to replace or augment standard library routines. A program could save the pointer from the global vector to the original routine and replace it with a pointer to an alternative version. The alternative might call the original as part of its processing. This
505:
The philosophy of BCPL is not one of the tyrant who thinks he knows best and lays down the law on what is and what is not allowed; rather, BCPL acts more as a servant offering his services to the best of his ability without complaint, even when confronted with apparent nonsense. The programmer is
427:
hardware was addressed in several ways. One was by providing standard library routines for packing and unpacking words into byte strings. Later, two language features were added: the bit-field selection operator and the infix byte indirection operator (denoted by
700:. Programmers at the time debated whether an eventual successor to C would be called "D", the next letter in the alphabet, or "P", the next letter in the parent language name. The language most accepted as being C's successor is
608:. The two machines had different word-lengths (48 vs 24 bits), different character encodings, and different packed string representations—and the successful bootstrapping increased confidence in the practicality of the method.
845:$ ) $ ) LET START() = VALOF $ ( ALL := 1 FOR I = 1 TO 12 DO $ ( COUNT := 0 TRY(0, 0, 0) WRITEF("%I2-QUEENS PROBLEM HAS %I5 SOLUTIONS*N", I, COUNT) ALL := 2 * ALL + 1 $ ) RESULTIS 0 $ )
550:
BCPL has been rumored to have originally stood for "Bootstrap
Cambridge Programming Language", but CPL was never created since development stopped at BCPL, and the acronym was later reinterpreted for the BCPL book.
458:
and the braces survived the syntactical changes and have become a common means of denoting program source code statements. In practice, on limited keyboards of the day, source programs often used the sequences
527:(CPL), which was designed during the early 1960s. Richards created BCPL by "removing those features of the full language which make compilation difficult". The first compiler implementation, for the
689:
computers were also released in 1986 by UK software house Arnor Ltd. MacBCPL was released for the Apple
Macintosh in 1985 by Topexpress Ltd, of Kensington, England.
360:
a system. A major reason for the compiler's portability lay in its structure. It was split into two parts: the front end parsed the source and generated O-code, an
266:
for other languages, BCPL is no longer in common use. However, its influence is still felt because a stripped down and syntactically changed version of BCPL, called
828:
If these programs are run using
Richards' current version of Cintsys (December 2018), LIBHDR, START and WRITEF must be changed to lower case to avoid errors.
1252:
719:
In 1979, implementations of BCPL existed for at least 25 architectures; the language gradually fell out of favour as C became popular on non-Unix systems.
1227:
834:
GET "LIBHDR" LET START() = VALOF $ ( FOR I = 1 TO 5 DO WRITEF("%N! = %I4*N", I, FACT(I)) RESULTIS 0 $ ) AND FACT(N) = N = 0 -> 1, N * FACT(N - 1)
1237:
1120:
1242:
1232:
867:
439:
in a unique way. There are no user-declarable global variables; instead, there is a global vector, similar to "blank common" in
1247:
540:
416:
indirected through a value, effectively treating it as a pointer.) In order for this to work, the implementation provided no
516:
279:
168:
352:
BCPL was designed so that small and simple compilers could be written for it; reputedly some compilers could be run in 16
677:
in the mid-1980s, by
Richards Computer Products, a company started by John Richards, the brother of Martin Richards. The
1179:
1075:
961:
994:
356:. Furthermore, the original compiler, itself written in BCPL, was easily portable. BCPL was thus a popular choice for
1140:
1023:
815:
339:
124:
797:
105:
523:
in 1967. BCPL was a response to difficulties with its predecessor, Cambridge
Programming Language, later renamed
374:
of the compiler's code needed to be rewritten to support a new machine, a task that usually took between 2 and 5
77:
27:
782:
752:
532:
479:
321:
62:
524:
379:
84:
394:
199:
404:
The interpretation of any value was determined by the operators used to process the values. (For example,
663:
383:
455:
275:
212:
91:
544:
357:
232:
364:. The back end took the O-code and translated it into the machine code for the target machine. Only
713:
697:
693:
652:
600:
An early compiler, bootstrapped in 1969, by starting with a paper tape of the O-code of
Richards's
483:
274:
was based. BCPL introduced several features of many modern programming languages, including using
271:
267:
228:
224:
793:
520:
310:
283:
73:
51:
543:
in the spring of 1967. The language was first described in a paper presented to the 1969 Spring
256:
252:
248:
156:
152:
148:
871:
601:
361:
317:
58:
678:
259:
143:
8:
838:
555:
709:
559:
894:
1161:
1136:
1071:
1019:
1013:
957:
927:
1203:
1166:
644:
591:
572:
506:
always assumed to know what he is doing and is not hemmed in by petty restrictions.
436:
1157:
1096:
98:
724:
605:
587:
424:
163:
648:
594:
1199:
976:
789:
1221:
1212:
1152:
1052:
914:
612:
417:
1184:
26:
This article is about the programming language. For the library system, see
1192:
1188:
1170:
1125:
1101:
1038:
981:
686:
682:
632:
536:
193:
647:
without using the intermediate O-code. The initial implementation was a
731:
584:
324: in this section. Unsourced material may be challenged and removed.
674:
390:
375:
1011:
800:. Statements consisting only of original research should be removed.
299:
40:
628:
580:
528:
353:
263:
667:
616:
440:
409:
401:
or on machines with larger word sizes such as 32-bit or 64-bit.
917:
The BCPL Cintsys and
Cintpos User Guide, 2.1.4 Section brackets
659:
655:
620:
576:
701:
640:
636:
487:
20:
692:
Both the design and philosophy of BCPL strongly influenced
624:
564:
398:
1109:
BCPL - a tool for compiler writing and systems programming
643:
and Atlas 2. In 1974 a dialect of BCPL was implemented at
1176:
491:
1065:
951:
751:
Richards and Whitby-Strevens provide an example of the
575:
were written partially or wholly in BCPL (for example,
662:
used in BBN's implementation of the second generation
278:
to delimit code blocks. BCPL was first implemented by
995:"Reuters technical development: Glossary - THE BARON"
862:
860:
858:
723:
it, including for his research on musical automated
1113:
Proceedings of the Spring Joint
Computer Conference
758:GET "LIBHDR" LET START() BE WRITES("Hello, World")
755:for BCPL using a standard system header, 'LIBHDR':
681:made use of the language. Versions of BCPL for the
378:. This approach became common practice later (e.g.
65:. Unsourced material may be challenged and removed.
583:). BCPL was also the initial language used in the
1066:Richards, Martin; Whitby-Strevens, Colin (1980).
952:Richards, Martin; Whitby-Strevens, Colin (1980).
855:
423:The mismatch between BCPL's word orientation and
1219:
1118:Martin Richards, Arthur Evans, Robert F. Mabee,
1012:Kernighan, Brian W.; Dennis M. Ritchie (1978).
868:"Martin Richards (2003 Computer Pioneer Award)"
611:By late 1970, implementations existed for the
1005:
501:describes the philosophy of BCPL as follows:
1158:Martin Richards' BCPL Reference Manual, 1967
408:added two values together, treating them as
16:Multi-paradigm computer programming language
1253:University of Cambridge Computer Laboratory
1198:How BCPL evolved from CPL, Martin Richards
1050:
554:BCPL is the language in which the original
389:The language is unusual in having only one
1228:History of computing in the United Kingdom
1209:has commentary about BCPL's influence on C
1053:"BCPL/README (BCPL Cintcode distribution)"
1018:. Bell Telephone Laboratories. p. 2.
915:https://www.cl.cam.ac.uk/~mr10/bcplman.pdf
673:There was also a version produced for the
535:, was written while Richards was visiting
1070:. Cambridge University Press. p. 8.
956:. Cambridge University Press. p. 5.
816:Learn how and when to remove this message
340:Learn how and when to remove this message
125:Learn how and when to remove this message
1131:Martin Richards, Colin Whitby-Strevens,
435:BCPL handles bindings spanning separate
1213:The BCPL Cintsys and Cintpos User Guide
886:
870:. IEEE Computer Society. Archived from
1220:
1238:Programming languages created in 1967
541:Massachusetts Institute of Technology
892:
765:
322:adding citations to reliable sources
293:
63:adding citations to reliable sources
34:
1135:(Cambridge University Press, 1980)
1133:BCPL, the language and its compiler
1068:BCPL: The Language and its Compiler
954:BCPL: The Language and its Compiler
761:
590:project. Among other projects, the
499:BCPL: The language and its compiler
482:of BCPL, which were not adopted by
262:. Originally intended for writing
245:Basic Combined Programming Language
13:
1153:Martin Richards' BCPL distribution
1088:
716:programming language also exists.
14:
1264:
1206:The Development of the C Language
1146:
1104:, Cambridge, MA, USA, July, 1967)
1243:Structured programming languages
1233:Procedural programming languages
770:
298:
270:, was the language on which the
39:
1059:
1044:
928:"Clive Feather on CPL and BCPL"
613:Honeywell 635 and Honeywell 645
309:needs additional citations for
50:needs additional citations for
28:Baltimore County Public Library
1032:
987:
970:
945:
920:
908:
746:
533:Compatible Time-Sharing System
515:BCPL was first implemented by
1:
1248:Systems programming languages
848:
579:and the earliest versions of
525:Combined Programming Language
658:, and directly targeted the
7:
1128:, Cambridge, MA, USA, 1974)
1115:, Vol 34, pp 557–566, 1969)
893:Pike, Rob (24 April 2014).
796:the claims made and adding
741:
696:, which in turn influenced
595:document preparation system
180:; 57 years ago
10:
1271:
1175:Nordier & Associates'
1041:Retrieved 12 December 2017
1015:The C Programming Language
562:was also written in BCPL (
510:
456:brace programming language
198:typeless (everything is a
25:
18:
1121:The BCPL Reference Manual
1097:The BCPL Reference Manual
712:), although meanwhile, a
545:Joint Computer Conference
447:could be used as a quick
289:
223:
218:
211:
206:
192:
174:
162:
142:
467:in place of the symbols
19:Not to be confused with
837:Count solutions to the
753:"Hello, World!" program
604:compiler, targeted the
558:was written. The first
556:"Hello, World!" program
521:University of Cambridge
284:University of Cambridge
508:
272:C programming language
597:was written in BCPL.
503:
362:intermediate language
679:BBC Domesday Project
318:improve this article
260:programming language
59:improve this article
1100:(Memorandum M-352,
874:on 24 November 2017
454:BCPL was the first
175:First appeared
139:
932:www.lysator.liu.se
831:Print factorials:
781:possibly contains
730:A common informal
710:increment operator
475:. The single-line
137:
1162:Dennis M. Ritchie
1107:Martin Richards,
1094:Martin Richards,
1051:Martin Richards.
999:www.thebaron.info
826:
825:
818:
783:original research
573:operating systems
437:compilation units
350:
349:
342:
238:
237:
194:Typing discipline
135:
134:
127:
109:
1260:
1185:ArnorBCPL manual
1082:
1081:
1063:
1057:
1056:
1048:
1042:
1036:
1030:
1029:
1009:
1003:
1002:
991:
985:
974:
968:
967:
949:
943:
942:
940:
938:
924:
918:
912:
906:
905:
903:
901:
890:
884:
883:
881:
879:
864:
839:N queens problem
821:
814:
810:
807:
801:
798:inline citations
774:
773:
766:
762:Further examples
737:
707:
651:hosted on BBN's
486:, reappeared in
478:
474:
470:
466:
462:
431:
415:
407:
373:
372:
368:
345:
338:
334:
331:
325:
302:
294:
188:
186:
181:
164:Designed by
140:
136:
130:
123:
119:
116:
110:
108:
67:
43:
35:
1270:
1269:
1263:
1262:
1261:
1259:
1258:
1257:
1218:
1217:
1149:
1091:
1089:Further reading
1086:
1085:
1078:
1064:
1060:
1049:
1045:
1037:
1033:
1026:
1010:
1006:
993:
992:
988:
975:
971:
964:
950:
946:
936:
934:
926:
925:
921:
913:
909:
899:
897:
895:"Hello Gophers"
891:
887:
877:
875:
866:
865:
856:
851:
846:
835:
822:
811:
805:
802:
787:
775:
771:
764:
759:
749:
744:
735:
725:score following
705:
606:ICT 1900 series
517:Martin Richards
513:
476:
472:
468:
464:
460:
451:debugging aid.
429:
413:
405:
370:
366:
365:
346:
335:
329:
326:
315:
303:
292:
280:Martin Richards
184:
182:
179:
169:Martin Richards
131:
120:
114:
111:
68:
66:
56:
44:
31:
24:
17:
12:
11:
5:
1268:
1267:
1256:
1255:
1250:
1245:
1240:
1235:
1230:
1216:
1215:
1210:
1201:
1196:
1182:
1173:
1164:
1155:
1148:
1147:External links
1145:
1144:
1143:
1129:
1116:
1105:
1090:
1087:
1084:
1083:
1077:978-0521785433
1076:
1058:
1043:
1039:History of C++
1031:
1024:
1004:
986:
969:
963:978-0521785433
962:
944:
919:
907:
885:
853:
852:
850:
847:
843:
833:
824:
823:
778:
776:
769:
763:
760:
757:
748:
745:
743:
740:
649:cross-compiler
512:
509:
348:
347:
306:
304:
297:
291:
288:
236:
235:
221:
220:
216:
215:
209:
208:
204:
203:
196:
190:
189:
176:
172:
171:
166:
160:
159:
146:
133:
132:
47:
45:
38:
15:
9:
6:
4:
3:
2:
1266:
1265:
1254:
1251:
1249:
1246:
1244:
1241:
1239:
1236:
1234:
1231:
1229:
1226:
1225:
1223:
1214:
1211:
1208:
1207:
1202:
1200:
1197:
1194:
1190:
1186:
1183:
1181:
1178:
1174:
1172:
1168:
1165:
1163:
1159:
1156:
1154:
1151:
1150:
1142:
1141:0-521-28681-6
1138:
1134:
1130:
1127:
1124:(MAC TR-141,
1123:
1122:
1117:
1114:
1110:
1106:
1103:
1099:
1098:
1093:
1092:
1079:
1073:
1069:
1062:
1054:
1047:
1040:
1035:
1027:
1025:0-13-110163-3
1021:
1017:
1016:
1008:
1000:
996:
990:
984:
983:
978:
973:
965:
959:
955:
948:
933:
929:
923:
916:
911:
896:
889:
873:
869:
863:
861:
859:
854:
842:
840:
832:
829:
820:
817:
809:
799:
795:
791:
785:
784:
779:This section
777:
768:
767:
756:
754:
739:
733:
728:
726:
720:
717:
715:
711:
703:
699:
695:
690:
688:
684:
680:
676:
671:
669:
665:
661:
657:
654:
650:
646:
642:
638:
634:
630:
626:
622:
618:
614:
609:
607:
603:
598:
596:
593:
589:
586:
582:
578:
574:
569:
567:
566:
561:
557:
552:
548:
546:
542:
538:
534:
530:
526:
522:
518:
507:
502:
500:
495:
493:
490:and later in
489:
485:
481:
457:
452:
450:
444:
442:
438:
433:
426:
425:byte-oriented
421:
419:
418:type checking
411:
402:
400:
396:
392:
387:
385:
381:
377:
376:person-months
363:
359:
358:bootstrapping
355:
344:
341:
333:
323:
319:
313:
312:
307:This section
305:
301:
296:
295:
287:
285:
281:
277:
273:
269:
265:
261:
258:
254:
250:
246:
242:
234:
230:
226:
222:
217:
214:
210:
207:Influenced by
205:
201:
197:
195:
191:
177:
173:
170:
167:
165:
161:
158:
154:
150:
147:
145:
141:
129:
126:
118:
107:
104:
100:
97:
93:
90:
86:
83:
79:
76: –
75:
71:
70:Find sources:
64:
60:
54:
53:
48:This article
46:
42:
37:
36:
33:
29:
22:
1205:
1132:
1119:
1112:
1108:
1095:
1067:
1061:
1046:
1034:
1014:
1007:
998:
989:
980:
972:
953:
947:
935:. Retrieved
931:
922:
910:
898:. Retrieved
888:
876:. Retrieved
872:the original
836:
830:
827:
812:
803:
780:
750:
734:for BCPL is
729:
721:
718:
691:
672:
666:used in the
610:
599:
570:
563:
553:
549:
514:
504:
498:
496:
453:
448:
445:
434:
422:
403:
388:
351:
336:
330:January 2017
327:
316:Please help
311:verification
308:
276:curly braces
244:
240:
239:
121:
112:
102:
95:
88:
81:
69:
57:Please help
52:verification
49:
32:
1189:Amstrad PCW
1171:Jargon File
1126:Project MAC
1102:Project MAC
982:Jargon File
878:24 November
806:August 2019
747:Hello world
736:text/x-bcpl
687:Amstrad PCW
683:Amstrad CPC
633:UNIVAC 1108
537:Project MAC
1222:Categories
1204:Ritchie's
1167:BCPL entry
849:References
790:improve it
708:being C's
585:Xerox PARC
257:structured
253:imperative
249:procedural
219:Influenced
157:structured
153:imperative
149:procedural
85:newspapers
794:verifying
732:MIME type
675:BBC Micro
497:The book
391:data type
354:kilobytes
286:in 1967.
264:compilers
900:11 March
742:Examples
629:CDC 6400
581:AmigaDOS
571:Several
529:IBM 7094
480:comments
410:integers
247:") is a
144:Paradigm
115:May 2010
1187:(1986,
1169:in the
937:1 March
788:Please
668:ARPANET
660:PDP-11s
656:PDP-10s
617:IBM 360
602:Atlas 2
539:at the
519:of the
511:History
441:Fortran
369:⁄
282:of the
183: (
99:scholar
1139:
1074:
1022:
960:
704:(with
621:PDP-10
577:TRIPOS
531:under
449:ad hoc
380:Pascal
290:Design
255:, and
101:
94:
87:
80:
74:"BCPL"
72:
653:TENEX
641:KDF 9
637:PDP-9
592:Bravo
106:JSTOR
92:books
21:BASIC
1180:port
1137:ISBN
1072:ISBN
1020:ISBN
977:BCPL
958:ISBN
939:2024
902:2016
880:2017
685:and
664:IMPs
625:TX-2
588:Alto
565:MUD1
471:and
463:and
399:byte
395:word
393:: a
384:Java
241:BCPL
200:word
185:1967
178:1967
138:BCPL
78:news
1193:CPC
1177:x86
1160:by
792:by
702:C++
645:BBN
568:).
560:MUD
492:C99
488:C++
465:$ )
461:$ (
432:).
386:).
320:by
213:CPL
61:by
1224::
997:.
979:,
930:.
857:^
841::
738:.
727:.
706:++
670:.
639:,
635:,
631:,
627:,
623:,
619:,
615:,
547:.
494:.
477://
420:.
412:;
382:,
251:,
243:("
233:Go
231:,
227:,
155:,
151:,
1195:)
1191:/
1111:(
1080:.
1055:.
1028:.
1001:.
966:.
941:.
904:.
882:.
819:)
813:(
808:)
804:(
786:.
714:D
698:C
694:B
484:C
473:}
469:{
430:%
414:!
406:+
371:5
367:1
343:)
337:(
332:)
328:(
314:.
268:B
229:C
225:B
202:)
187:)
128:)
122:(
117:)
113:(
103:·
96:·
89:·
82:·
55:.
30:.
23:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.