#1
January 23rd, 2016, 11:32 AM
| |||
| |||
Inventor of BCPL
For my GK knowledge want to know who is Inventor of BCPL , do you know about it , if so then plz let me know ??? BCPL stand for Basic Combined Programming Language which is a procedural, imperative, and structured computer programming language, its Invent by Martin Richards of the University of Cambridge in 1966. BCPL was the first brace programming language, and the braces survived the syntactical changes and have become a common means of denoting program source code statements BCPL is the language in which the original hello world program was written.[2] The first MUD was also written in BCPL (MUD1). These complete and compilable examples are from Martin Richards′ BCPL distribution. Print factorials: 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) Count solutions to the N queens problem: 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) $) $) 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 $) Last edited by Neelurk; June 15th, 2020 at 09:16 AM. |
|