Talk:PLANC
This article has not yet been rated on Wikipedia's content assessment scale. |
PLAN-C or PLANC?
[edit]There is debate on the actual pronunciation of PLANC, probably the thinking goes that this is an evolved language based on C thefore the PLAN-C. But for shortness and how the PLANC name is mentioned in the manual itself PLANK sounds a very good name for this special programming language. -Campenoli
- Do you have any reference to make you believe that it was based on C? Granted, it is very similar, but in the 70s C was a minority language, closely connected with the UNIX world, to which parts of SINTRAN was antithetical. Also, my personal belief is that it was pronounced "plank" because I've heard it first-hand from a SINTRAN developer. Granted, he pronounces "SCSI" as "SKAAH-see", but I think that is an anomaly :) I've sent off a mail to him now asking him what way it was pronounced. I should get a reply from him in not too much time. toresbe 12:50, 11 July 2006 (UTC)
Jeg har bare brukt og hørt at man uttaler PLANC rett fram som på norsk PLANK, når vi hadde kontakt med engelsktalende kunder etc. uttalte de det som oftes med mere Æ-lyd noe sånt som PLÆNK. Har aldri hørt noen uttale det i "to ord" som "Plan C".
Translation:
I've only used and heard the pronounciation of PLANC as with the Norwegian "PLANK", when we were in touch with English-speaking customers etc, they pronounced it with a more marked Æ-sound, something like "PLÆNK" (As an Englishman would pronounce "plank") I've never heard it pronounced in "two words" like "Plan C".
I think this sort of settles the debate :) toresbe 03:22, 12 July 2006 (UTC)
Having worked in Norsk Data around the time and often spoken with the people who worked on the PLANC compiler I think I can speak as an authority when I say the language was prounounced "PLANK" in norwegian and in english speaking circuits it was perhaps somewhat more like "PLÆNK", Actually, english would probably pronounce it more like norwegians do while americans would pronounce it more like americans pronounce the "a" in "can" etc. The language was loosely based on Pascal and had virtually nothing to do with C. It did sneak in some C-like constructs in experimental versions of the language where for example variable number of arguments were allowed etc.
One other thing is that as a relatively new thing of the time was operator overloading.
For example you could declare your own + operator like this:
routine T,U + (T : var) .....code here.... endroutine
T was the type of the "input parameter" which was referenced as @ in the code. U is the type of output parameter or the return value of the routine. + is the name of the routine and was thus overloading the regular operator for integers and so on.
Normally, you would have the same type for the second parameter also so var here is specified to be of type T as well in the example above. For + operator you would normally never declare more than one parameter.
To call a function you specified an expression for the input parameter before the name of the function (or routine) and then the function name (routine name) and then the arguments to the function. If the function had only one argument as in the case above you did not have to write parenthesis. Thus, calling the above function with a variable x of type T and a variable y of type T and storing the result in a variable z of type U you could write:
x + y =: z
If a routine did not have input parameter you would declare it as "void". If the routine was a subroutine that did not return a value you would declare the output parameter as "void". Thus, a subroutine with no arguments and returning nothing (having only side effects) would be declared as:
routine void,void : do_something ....code here... endroutine
Another snag with the language was that the assignment operator went opposite of how most people are used to it. It is expr =: variable. This form had several advantages, for example if storing temporary results.
x + 1 =: y - t * y =: z
In C code this would be written as:
y = x + 1 z = y - t * y
You could try to write it as z = (y = x + 1) - t * y provided you are sure that t * y is not computed until after the assignment of y in the early part of the expression.
I will place some of this into the main page at some time but I would like to get comments first. What else should we expand upon?
We should probably also talk a little about NPL (Nord Programming Language) which was a predecessor for PLANC?
salte 09:15, 6 December 2006 (UTC)
- Be bold! — You are without any doubt an authority on the subject, please feel free to make your contributions - which all are very valid. In the rather unlikely event that anyone disagrees with an edit you've made, we'll discuss the subject on the talk page or something. (BTW, you can automatically sign your comments with four tildes, which I think you haven't done - it saves time! :)) I'll start a quick stub on NPL now. Thanks, toresbe 09:46, 6 December 2006 (UTC)
I did use four ~ to sign.
I cannot find the NPL page you set up. There already is a page on NPL which is a different language. It is why I specified the link as I did. The link is currently red as the page does not exist yet.
salte 11:26, 6 December 2006 (UTC)
- OOPS! I'll fix that now. :) toresbe 12:18, 6 December 2006 (UTC)
- There, I moved it to NPL (NORD programming language) - do you think that's the right name? toresbe 12:20, 6 December 2006 (UTC)
Yes. Nord Programming Language - NPL. This is from the time when the "ND-10" etc computers was referred to as "NORD-10" etc. Later when those computers changed name to "ND-100" and so on the language probably also changed name to "ND Programming Language" but as such it should probably have rather been called NDPL and it never changed to that abbreviation. It was always called NPL and never NDPL.
Was a bit fast in saying "yes" back there. I would rather the link was without the parenthesis as part of the link. "Nord Programming Language" could be the link. There should also be a reference to it from the NPL disambiguation page.
salte 12:30, 6 December 2006 (UTC)
- You know, I agree. It's now at NORD Programming Language. toresbe 13:35, 6 December 2006 (UTC)
Some additions
[edit]First I added a sentence explaining what PLANC stands for. This should settle any debate about PLAN-C or whatever - as if it hasn't already been settled :)
I also added a sentence that in addition to the predefined types of the language you can also define your own types.
For example
TYPE T = INTEGER;
Would declare that T is now an integer type. Normally you would use it in connection with modifiers of range so
TYPE T = INTEGER RANGE(0:63);
Would declare T to be a 6 bit integer. For regular storage it would take the same space as a BYTE but in a PACKED array or record it would take exactly 6 bits.
As such the BITS data type is simply BOOLEAN ARRAY PACKED and the BYTES (string) type is the same as BYTE ARRAY PACKED.
salte 08:03, 7 December 2006 (UTC)
Added description of some statements.
[edit]I am not happy with the way WIKI does it when trying to display program code. What clauses do I put around to get WIKI to honor line breaks, indentations etc without displaying frames around the indented text?
I am still a wiki newbie :)
salte 15:02, 8 December 2006 (UTC)
Control statements - code on exit from loop
[edit]I remember that PLANC used some interesting controlstatements. Wasn't there a possibility to define code that only run on normal exit from a loop? or only run on exceptional exit from a loop?
I have never programmed PLANC myself but I once had a manual. (Might still have somewere...) —Preceding unsigned comment added by RogerJL (talk • contribs) 10:43, 30 April 2008 (UTC)
- Yes - the EXITFOR. Forget what the other construct was; it's been too many years. --Alvestrand (talk) 21:32, 30 April 2008 (UTC)
- EXITWHILE was the other construct; the combination of FOR, WHILE anywhere in the block, and EXITWHILE/EXITFOR allowed natural expression of logic that would require nasty convolutions in any other language I've encountered. POP-11 is the only other language I know with assignments the correct way round. I've a copy of the PLANC reference in a box somewhere in my garage (along with ND-100 and ND-500 references); I can't bear to throw them away. PeteJordan (talk) 17:06, 26 May 2008 (UTC)