| Related articles |
|---|
| From: | gah4 <gah4@u.washington.edu> |
| Newsgroups: | comp.compilers |
| Date: | Mon, 3 Jan 2022 21:07:07 -0800 (PST) |
| Organization: | Compilers Central |
| References: | 21-12-003 21-12-017 21-12-022 21-12-026 21-12-033 22-01-007 |
| Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="66195"; mail-complaints-to="abuse@iecc.com" |
| Keywords: | syntax, comment |
| Posted-Date: | 04 Jan 2022 13:15:39 EST |
| In-Reply-To: | 22-01-007 |
On Monday, January 3, 2022 at 11:58:39 AM UTC-8, mac wrote:
> > [Interesting take. In reality, of couse, BASIC borrowed that from Fortran. Algol
> > used := for assignment, different from = for equality comparison. -John]
> Indeed.
> Unfortunately, assignment is probably the single most common operator.
> The ASCII committee should have kept the left-arrow character instead of
> replacing it with underscore.
The assignment statement in BASIC, at least the ones I know, has an
(optional) LET keyword, so it might say:
10 LET A=3
Most people leave it off, though.
Is PL/I the only language that uses = for both assignment and the relational operator?
Since expressions are not statements, it avoids the ambiguity that would otherwise occur.
I believe some BASIC also use = for both.
Underscore is a pretty useful character.
The two ASCII characters that don't exist in EBCDIC are ^ and ~.
Two EBCDIC characters that don't exist in ASCII are 𝇍 (cent)
and ¬ (logical NOT sign). Conversion tables usually cross
map those pairs. (PL/I, at least, uses ¬ and ¬= operators.)
[In original Dartmouth BASIC the LET was mandatory, but it was a considerably
smaller and fully compiled language than the later dialects. On the other
hand, PL/I made a fetish of nothing being a reserved word, e.g.
IF IF = THEN THEN ELSE = BEGIN; ELSE END = IF;
-John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.