HP Forums

Full Version: What makes "FOCAL" FOCAL?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What exactly distinguishes 41 programming features so much from previous models that it warranted its own (unofficial) name as a distinct language?

Many of the differences are just quantitative incremental ones: more registers, flags, tests; and multiple index and looping registers. Alphanumeric representation of programming steps (vs. key codes) isn’t really, strictly speaking, a language change. And even the ability to program many more operations than can be represented on the keyboard (as Alphanumeric labels) is arguably not a programming feature as such, but a feature of the functionality being programmed.

Is it just the difference between the “keystep programming” of previous models and more general “RPN programming”, freed from the constraint that each operation must correspond to a key?
The huge popularity of the 41 spawned all kinds of unprecedented activities. among these, HP's Calculator newsletter "Key Notes" held a 'name the 41 programming language contest'. After reviewing many entries, the winner, FOCAL (for Forty One CAlculator Language) was selected, however after picking the winner but before publishing it, HP discovered that FOCAL was a trademarked name belonging to DEC, for a BASIC-like programming language, and ultimately decided to not announce and adopt the name. At about this same time, HP discontinued Key Notes, so there was no convenient way to notify the readers of the discovery and decision, so it was simply never acknowledged.

But users had informally learned the name of the winner (likely from HP folks mentioning it before it was squashed) and started using it.

As for if it's unique features justify having a name when predecessors did not, who can say if that's reasonable and 'fair'? The ever-increasing numbers of non-engineering professionals writing and using 41 programs wanted a name easier to use than 'forty one programming language' and there were a huge number of questions sent to Key Notes and PPC asking what name they should use, which led to the contest.
(04-10-2020 05:18 PM)rprosperi Wrote: [ -> ]As for if it's unique features justify having a name when predecessors did not, who can say if that's reasonable and 'fair'?

The question isn't whether the name was justified (or what the history was), but whether there are specific language features that distinguish it. Put another way: would you say that the 35s programming language is effectively a version of FOCAL (and if not, what distinguishes it)?
One distinguishing feature would likely be position independent labels. Prior models used step numbers as the target for GTO/GSB commands. A label like NEXT or PREV would be more informative than 22 or 37. If you're writing a program on the fly, you could branch to a target before the target was even written. Very similar to a high level language where you don't have to write a function first before referencing it.

Qualify?

Psst. Don't mention the 35s in the same breath as the revered 41. There are some members here that would stone you Smile
(04-10-2020 06:57 PM)Orome Wrote: [ -> ]The question isn't whether the name was justified (or what the history was), but whether there are specific language features that distinguish it. Put another way: would you say that the 35s programming language is effectively a version of FOCAL (and if not, what distinguishes it)?

I've only ever heard it used, and would only use it myself, to refer to HP-41 programming in user code (vs. MCODE). That doesn't make us right, but as far as I know this is the only way FOCAL is used.

The 41 has many unique features, global alphanumeric labels, alpha register, etc. so the full scope of FOCAL really doesn't apply to other RPN models.

The only machine one might make a case for would be the HP-42S (and Free42, DM42, etc.), and this likely has been used by some folks in some cases since it is nearly identical.

And as Mark noted, caution is advised when comparing any machine favorably with the 41. Big Grin
(04-11-2020 03:16 AM)rprosperi Wrote: [ -> ]The only machine one might make a case for would be the HP-42S (and Free42, DM42, etc.), and this likely has been used by some folks in some cases since it is nearly identical.

Save for I/O, the HP42S isn't "nearly identical" but vastly superior in every aspect.

Quote:And as Mark noted, caution is advised when comparing any machine favorably with the 41. Big Grin

The HP-71B runs rings around the HP-41C in every aspect too, I/O included, about an order of magnitude superior.

V.
(04-11-2020 05:52 AM)Valentin Albillo Wrote: [ -> ]
(04-11-2020 03:16 AM)rprosperi Wrote: [ -> ]The only machine one might make a case for would be the HP-42S (and Free42, DM42, etc.), and this likely has been used by some folks in some cases since it is nearly identical.

Save for I/O, the HP42S isn't "nearly identical" but vastly superior in every aspect.
V.

It is a real shame that HP didn't at least put an IR receiver in the HP-42S so it could do two-way communications like the later HP-48SX model did. Even limited I/O would have been better than none.
(04-11-2020 05:52 AM)Valentin Albillo Wrote: [ -> ]
(04-11-2020 03:16 AM)rprosperi Wrote: [ -> ]The only machine one might make a case for would be the HP-42S (and Free42, DM42, etc.), and this likely has been used by some folks in some cases since it is nearly identical.

Save for I/O, the HP42S isn't "nearly identical" but vastly superior in every aspect.

Quote:And as Mark noted, caution is advised when comparing any machine favorably with the 41. Big Grin

The HP-71B runs rings around the HP-41C in every aspect too, I/O included, about an order of magnitude superior.

V.

Hello Valentin, I hope this finds you safe and well.

Regarding the HP-42S, my comments about being nearly identical were with respect to its programming language, the core subject of this thread.

As for the HP-71B, also my favorite of all HP machines, it is undoubtedly better in every way except size, and still the machine I use and continue to explore more than any other. But the above comments were aimed at RPN machines, again the the topic in the thread, though I admit my statement is not so clear on its own.
Hello!

(04-11-2020 01:37 PM)rprosperi Wrote: [ -> ]As for the HP-71B, also my favorite of all HP machines, it is undoubtedly better in every way except size, ...

To further continue this thread drift: As much as I like the HP-71B myself, there is one very important aspect in which it is vastly inferior to almost every other calculator, unfortunately: Its very limited usablity as a simple calculating tool. 95% of what I - and I guess almost anyone - use a calcultaor for is performing simple calculations on the fly. No elabaorate programming tricks, no laboratory equipment controlled by a pocketable device (never had any use for that anyway), no printing or mass storage. Just like the question I was asked lately: How much does an aeroplane contribute to the total water contents of the atmosphere during every hour of flight? And what must be the conditions so that a contrail will either dissolve quickly or become the cause of a cloud overcast. I guess the 71B would be one of the last calculators to use for that kind of task...

And to the original thread: In my opinion the HP-41C did not add sufficient new features to previous RPN keystroke programming implementations to qualify for it's own programming language. FOCAL or what else one may call it.

Regards
Max
(04-11-2020 02:14 PM)Maximilian Hohmann Wrote: [ -> ]To further continue this thread drift: As much as I like the HP-71B myself, there is one very important aspect in which it is vastly inferior to almost every other calculator, unfortunately: Its very limited usablity as a simple calculating tool. 95% of what I - and I guess almost anyone - use a calcultaor for is performing simple calculations on the fly. No elabaorate programming tricks, no laboratory equipment controlled by a pocketable device (never had any use for that anyway), no printing or mass storage. Just like the question I was asked lately: How much does an aeroplane contribute to the total water contents of the atmosphere during every hour of flight? And what must be the conditions so that a contrail will either dissolve quickly or become the cause of a cloud overcast. I guess the 71B would be one of the last calculators to use for that kind of task...

And to the original thread: In my opinion the HP-41C did not add sufficient new features to previous RPN keystroke programming implementations to qualify for it's own programming language. FOCAL or what else one may call it.

Regards
Max

Within a couple months of introduction of the 71B, RPN programs became available for it, initially in BASIC, then a .BIN program (assembler) and later still in FORTH. I've had one installed since they became available for on-the-fly calculating, since I effectively can't use the 71B's cute 'CALC MODE' to do anything useful.

As for the name, I don't think the 41 'qualified' based on anyone's assessment of technical merit or innovation, it was simply that the number of people that were actually writing calculator programs exploded with the introduction of the 41, including many people with non-technical backgrounds (aka average consumers) and HP was looking for something simpler/easier to say and write than 'the HP-41's programming language' every time they needed to reference it.

Henry Horn did not consult with me when he decided to run the contest, so I can't guarantee that was their motivation, but they did publish more than one letter from folks asking what the language was called.
(04-11-2020 03:16 AM)rprosperi Wrote: [ -> ]The 41 has many unique features, global alphanumeric labels, alpha register, etc. so the full scope of FOCAL really doesn't apply to other RPN models.

So it's primarily the things that follow from alphanumeric labeling that distinguish FOCAL?
I consider the 71B to be a handheld computer, not a calculator: QWERTY keyboard, BASIC language, vestigial "calc mode". The FORTH and Math ROMs do give it more calculator-like abilities but it's still not directly comparable to RPN calculators IMHO.

I still have the 71B that I bought new in 1984 and it was a blast at the time but I seldom use it now, mostly due to the 1-line display.

To get back on topic, I never owned a 41 because they seemed slow and expensive. I agree with Valentin that the 71b is a superior machine.
(04-11-2020 06:09 PM)Orome Wrote: [ -> ]So it's primarily the things that follow from alphanumeric labeling that distinguish FOCAL?

Note that labels don't have to be alphanumeric to be labels. A useful feature of numeric labels is that you can use GETKEY or GETKEYX to wait for keyboard input, followed by GTO IND X (using flag 25 to catch errors caused by keys that don't go to any label) to use the key number as the name of a numeric label to get to the desired place in the program.

I have my 41cx which I use regularly, and two 71's which I almost never touch. The 71 definitely has tons more speed and memory (I have 177KB of RAM in mine), but the 41's RPN is more practical for most things for me; so I use a 71 only when I need to do something that requires the larger memory or where the 41's speed would be prohibitively slow. My programs are seldom more than a few hundred bytes, and for the number of times I run one, the development time is more important than the run speed, so I use the 41. I have Forth on the 71 (which is where I originally picked up Forth), but when I use Forth, I normally use a home-made workbench computer whose performance is far, far ahead of the 71's performance.
.
Hi, Bob:

(04-11-2020 01:37 PM)rprosperi Wrote: [ -> ]Hello Valentin, I hope this finds you safe and well.

Well, thank you for your interest and kind wishes, me and my family are all perfectly Ok, I hope and wish the same for you and yours.

Quote:Regarding the HP-42S, my comments about being nearly identical were with respect to its programming language, the core subject of this thread.

Ok, I assumed "identical" referred to the machine itself, not the language. In keeping to this thread's subject, I completely hate the name "FOCAL" and have never used it, not once. In Spanish it means something like "seal-ish", i.e. "relative to seals" (seal = marine mammal), so it sounds ridiculous to say the least.

I don't think that the keystroke programming paradigm of the HP-41C deserves or needs to be named as a "programming language". Else, the HP-15C , say, also has its own variety which thus would also need naming, which is nonsense.

Just having alphanumeric capabilities doesn't seem enough of a difference to merit having a name assigned.

Best regards.
V.
(04-13-2020 09:16 PM)Valentin Albillo Wrote: [ -> ]Just having alphanumeric capabilities doesn't seem enough of a difference to merit having a name assigned.

Is there anything else that distinguishes the 41's programming semantics and features from those of earlier models? As near as I can tell, it's just a flavor of "keystroke programming", with some added usability features (mostly supplied by the alphanumeric capabilities) such as longer and more varied label names, textual display of operations (vs. key codes), etc. Anything else?

If that's all there is, then from a linguistic point of view, I agree that it hardly qualifies as a "new" language (though from a popularity and marketing angle, it arguably warrants some kind of moniker).
Just to mention it, I submitted my entry for the HP-41 programming language name contest.

My idea (for what it may be worth) was based on the most important features which set the HP'41C on a class by itself at the time. Of course, this was just my opinion.

Those features were

> Expandability (hardware) There were many peripherals, modules, an expansion bus (albeit a proprietary one) and HP-IL as a more generic interface (quite proprietary indeed...).

> User-definable keyboard, by means of key assignments (and overlays!).

> RPN logic.

> Extendability (software) via modules, extended functions, and the fact that user programs (and ROM module based programs) can be invoked with the same format as built-in functions. Programs may be imported from external devices, also...

> Keystroke programmability, as opposed to BASIC text programming used by some Sharp handheld computers and equivalent machines at the time. We press SIN - (one key) instead of typing S I N ( ) - (five keys) .

> Alphanumeric capabilities.


These features form the acronym EUREKA, which seemed to be a good name for a scientific calculator programming language (from my point of view, at least).

I must admit that the HP-42S cannot be considered EUREKA compatible, as hardware expandability is regrettably missing and software extendability is hindered by the lack of wand, card reader and ROM modules, which makes program transfer a real pain.

BTW, as I had been a user of FOCAL on a DEC LSI-11 computer in 1978, I never liked FOCAL for the 41C. FOCAL was a BASIC-like language which accepts decimal fractions for line numbers: if you needed to insert a line between lines 1 and 2 you can number that line as 1.5 (or 1.234 if you prefer) and it will be OK.
.
Hi, Andrés:

(04-13-2020 09:50 PM)Andres Wrote: [ -> ]Those features were

> Expandability (hardware) There were many peripherals, modules, an expansion bus (albeit a proprietary one) and HP-IL as a more generic interface (quite proprietary indeed...).

That has nothing to do with the programming language. The fact that it has more keywords available to handle peripherals or available in modules doesn't change a thing about the underlying language.

The SHARP PC-1211, the very first so-called handheld computer had a BASIC language featuring just a few dozen keywords, unexpandable, while the HP-71B had a BASIC featuring some 240+ keywords with many hundreds more available as LEX files or plug-in modules, including keywords for controlling peripherals.

It was still BASIC. No one suggested or considered renaming it to something else because of the many hundreds of new keywords or peripheral control.

Quote:> User-definable keyboard, by means of key assignments (and overlays!).

Again, this has nothing to do with the programming language. Seems to me you're confusing "programming language" with "operating system" or even "user interface".

Quote:> RPN logic.

Ditto.

Quote:> Extendability (software) via modules, extended functions, and the fact that user programs (and ROM module based programs) can be invoked with the same format as built-in functions. Programs may be imported from external devices, also...

Already addressed above.

Quote:> Keystroke programmability, as opposed to BASIC text programming used by some Sharp handheld computers and equivalent machines at the time. We press SIN - (one key) instead of typing S I N ( ) - (five keys).

First of all, keystroke programmability where "we press [SIN] - (one key)" was already available in the HP-25, HP-55 and HP-67 and no one ever considered necessary to gave their "programming languages" a name. It was just keystroke programming and that was that. Perhaps you do consider necessary to also name their versions ?

Second, you don't type "S I N ( ) - (five keys)" in most BASIC pocket computers. Even the very first one, the already mentioned 40-year-old SHARP PC-1211, did allow assigning that sequence to a key so you could press the key to get the "SIN(" in the display, ready to key in your number. Further, you could also assign much longer keystroke sequences (up to 80 characters) to a single key, which you couldn't do with the HP-41C so I don't get where's the alleged advantage.

Needless to say you can also do the same with the HP-71B and matter of fact you can get a SIN( in the display without having to assign anything, it's already available as a shifted typing aid.

Seems to me you haven't used any BASIC pocket computer much, if at all, or you would know that.

Quote:> Alphanumeric capabilities.

This has nothing to do with language, as already mentioned. Having a program step displayed as 14 34 or as SIN doesn't change the "language" an iota. Same with outputting 23.24 vs. COST=23.14, or GTO 23 vs. GOTO "POLYRF".

Again, seems to me you're confusing the characteristics that do define a language with something else.

Regards and take care.
V.
(04-13-2020 11:22 PM)Valentin Albillo Wrote: [ -> ].
Hi, Andrés:

(04-13-2020 09:50 PM)Andres Wrote: [ -> ]Those features were

> Expandability (hardware) There were many peripherals, modules, an expansion bus (albeit a proprietary one) and HP-IL as a more generic interface (quite proprietary indeed...).

That has nothing to do with the programming language. The fact that it has more keywords available to handle peripherals or available in modules doesn't change a thing about the underlying language.

The SHARP PC-1211, the very first so-called handheld computer had a BASIC language featuring just a few dozen keywords, unexpandable, while the HP-71B had a BASIC featuring some 240+ keywords with many hundreds more available as LEX files or plug-in modules, including keywords for controlling peripherals.

It was still BASIC. No one suggested or considered renaming it to something else because of the many hundreds of new keywords or peripheral control.

Quote:> User-definable keyboard, by means of key assignments (and overlays!).

Again, this has nothing to do with the programming language. Seems to me you're confusing "programming language" with "operating system" or even "user interface".

Quote:> RPN logic.

Ditto.

Quote:> Extendability (software) via modules, extended functions, and the fact that user programs (and ROM module based programs) can be invoked with the same format as built-in functions. Programs may be imported from external devices, also...

Already addressed above.

Quote:> Keystroke programmability, as opposed to BASIC text programming used by some Sharp handheld computers and equivalent machines at the time. We press SIN - (one key) instead of typing S I N ( ) - (five keys).

First of all, keystroke programmability where "we press [SIN] - (one key)" was already available in the HP-25, HP-55 and HP-67 and no one ever considered necessary to gave their "programming languages" a name. It was just keystroke programming and that was that. Perhaps you do consider necessary to also name their versions ?

Second, you don't type "S I N ( ) - (five keys)" in most BASIC pocket computers. Even the very first one, the already mentioned 40-year-old SHARP PC-1211, did allow assigning that sequence to a key so you could press the key to get the "SIN(" in the display, ready to key in your number. Further, you could also assign much longer keystroke sequences (up to 80 characters) to a single key, which you couldn't do with the HP-41C so I don't get where's the alleged advantage.

Needless to say you can also do the same with the HP-71B and matter of fact you can get a SIN( in the display without having to assign anything, it's already available as a shifted typing aid.

Seems to me you haven't used any BASIC pocket computer much, if at all, or you would know that.

Quote:> Alphanumeric capabilities.

This has nothing to do with language, as already mentioned. Having a program step displayed as 14 34 or as SIN doesn't change the "language" an iota. Same with outputting 23.24 vs. COST=23.14, or GTO 23 vs. GOTO "POLYRF".

Again, seems to me you're confusing the characteristics that do define a language with something else.

Regards and take care.
V.

Hi Valentín,

Just to make it clear, I said I submitted the acronym EUREKA as a candidate name for the programming "language" of the HP 41 based on what I felt then as the most distinctive features of the HP-41C, which (in my opinion) set the HP-41C on a class by itself at the time. Again, those were features of the HP-41 system, I never said they were features of the programming language or environment.

I think no other handheld calculator/computer of that time had all those features, but of course there were keystroke programmables before (I had a 25 before my 41, and did a lot of programming for both of them), there were alphanumeric-capable machines as the BASIC-oriented pocket computers, and so on. But I think the HP 41 system was the only one where all of those features were present. It may be argued if all of them are virtues or not, so I consider them just features.

I did used different pocket computers and I also do have a 71B, which I like indeed, even if my unit doesn't have the all-important Math ROM.

Now, I admit I may had stressed the definitions a bit, working without mathematical precision, because it was just a contest to give a name to a calculator programming language (by the way, the contest or the idea of giving this programming environment a name were obviously not started by me). Not all programming language names are formally derived as a proof of a theorem or a chemical formula for a polymer. There are languages named Java or Python for no scientific reason. APL means "A Programming Language". I would not challenge Kemeny and Kurtz about why BASIC is not called BAPSIC... and, by the way, why BASIC is particularly Symbolic? It seemed acronym makers were allowed to take some shortcuts, and use some words with a grain of salt. So, some 40 years ago, I proposed a possible acronym which I related to some important features of the HP-41. That was it.

Perhaps it was not intended (or was it?), but some of your comments convey a not-so-friendly tone, as pointing at me as someone who is confused, someone who doesn't know the difference between some basic computing concepts, or someone who talks about things he never had contact with. A little short of the definition of a liar. I will just let those words fade out over time.

Best regards, and, again, thank you for your always insightful and clever articles.
(04-13-2020 09:29 PM)Orome Wrote: [ -> ]Is there anything else that distinguishes the 41's programming semantics and features from those of earlier models? As near as I can tell, it's just a flavor of "keystroke programming", with some added usability features (mostly supplied by the alphanumeric capabilities) such as longer and more varied label names, textual display of operations (vs. key codes), etc. Anything else?

If you are looking for differences in the programming semantics (i.e. opcodes), then I would point to the soft END as a distinguishing feature of the HP41, compared to prior models. Early models treated program instruction space as a uniform array of keystroke steps (opcodes) that you could fill in. Later models added the GSB/RTN opcodes to modularly partition code, but it was still a uniform address space. For instance, the Voyager series (eg 15C) could have multiple programs in memory, each invoked by a GSB "label" keystroke. But you still had to think in terms of the 49 or 99 steps you had available to place code into, and where to place it.

Like a high level language, such as 71B BASIC, the 41 could support a structured programming approach to problem solving. You could decompose a program into separate functions, move functions between main memory, extended memory and external storage, and even collect them into function libraries (modules whose FAT served as linker global references). At this point you were starting to abstract the underlying hardware model and focus more on the problem to solve. I think that was an important step from just "what keys do I punch" to "how do I solve this problem."

Now, as to whether the 41 opcode set deserves its own name, you might as well ask why the Prime programming language is given the name PPL. Hey, why not Smile
(04-14-2020 06:49 AM)mfleming Wrote: [ -> ]If you are looking for differences in the programming semantics (i.e. opcodes), then I would point to the soft END as a distinguishing feature of the HP41, compared to prior models...

Can you say more about why you think of this an any different semantically from label addressing generally?

(04-14-2020 06:49 AM)mfleming Wrote: [ -> ]...move functions between main memory, extended memory and external storage...At this point you were starting to abstract the underlying hardware model.

That doesn't sound to me like abstraction (it sounds more like explicitly worrying about it).
Pages: 1 2
Reference URL's