T
Tech07
Richard said:The charming thing about this particular food fight is that every
one is right.
In retrospect? Are you ignoring the previous posts? Or history? (rhetorical
questions).
Richard said:The charming thing about this particular food fight is that every
one is right.
Flash said:Using errno correctly is easy,
Do tell! How can I use errno correctly in a multi-threaded program?
user923005 said:In such programs, it is stored in thread local storage. The
definition in these cases is not a static integer at all. For
instance:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include>grepcarl
Since the C language does not define threads (and any solution to this
issue will be inherently non-portable since C itself does not define
it), it's not terribly topical anyway. Certainly
news:comp.programming.threads would be more on target.
Oh, so you said it. OK, Peter:
1. Nilges is my father's name. He is now retired, but fought the good
fight as a physician for medical ethics and against nuclear war.
2. Nilges is my uncle's name. He died saying "follow me" as a captain
in the United States Army.
3. If you and I ever meet, and you use that word, you will be needing
a new set of teeth.
just curious, why? Is assignment not allowed at that point or does the
programmer not permit the assignment of 1 to a bool?
Algol68 tries to treat BOOL and INT as two different types
of data.
For example BOOL has the NOT,AND,OR operators, whereas
INT has it's own ,-,*,/ operators.
Any mixing causes a compile
time triggers syntax error forcing the programmer to reconsider
what s/he is trying to achieve.
Below is a short program to demonstrate the relationship
and conversions between the distinct types BYTES, []CHAR, INT,
BITS and []BOOL.
Enjoy
Neville Dempsey
I was just suprised it was a *syntax* error. Obviously Algol-68's
syntax was great deal tougher than most (even most modern) languages.
C for instance calls errors like this "constraint errors"
NevilleDNZ said:It happens at compile time.... I've always called compile
time errors "syntax errors"... maybe I am wrong calling them
syntax errors as the word "syntax" seems to suggest the
sentence structure is wrong. Maybe this is better called a
"semantic error"?
Algol-68 is defined by a two-level grammar which is powerful enough
to do type-checking as well as sentence structure, so type errors
/are/ syntax errors in that case.
However, this approach to language definition has not become popular,
Chris Dollin said:Algol-68 is defined by a two-level grammar which is powerful enough
to do type-checking as well as sentence structure, so type errors
/are/ syntax errors in that case.
However, this approach to language definition has not become popular,
and it seems to be more usual to define the long-range checks of
programming languages -- the sorts of things that type-checking
in a statically-checked language is -- separately from the syntactic
structure and indeed relying on it.
It *is* quoted out of context. But Algol-68's syntax representation
is a far tougher cookie than BNF.
0.1.3 Security
ALGOL 68 has been designed in such a way that
most syntactical and many other errors can be
detected easily before they lead to calamitous
results. Furthermore, the opportunities for making
such errors are greatly restricted.
Richard said:The issue of whether van Wijngaarden grammars clarify or obscure
syntax descriptions is a matter of current debate: what is certain
is that up to now they haven't inspired any new kinds of parsing
mechanisms which can use their undoubted powers of expression.
[Bornat, 1979]
And of course, you wouldn't want a compiler that when faced with
a type error just said "syntax error"
....
> I was just suprised it was a *syntax* error. Obviously Algol-68's
> syntax was great deal tougher than most (even most modern) languages.
> C for instance calls errors like this "constraint errors"
> It happens at compile time.... I've always called compile
> time errors "syntax errors"... maybe I am wrong calling them
> syntax errors as the word "syntax" seems to suggest the
> sentence structure is wrong. Maybe this is better called a
> "semantic error"?
[/QUOTE]The issue of whether van Wijngaarden grammars clarify or obscure
syntax descriptions is a matter of current debate: what is certain
is that up to now they haven't inspired any new kinds of parsing
mechanisms which can use their undoubted powers of expression.
[Bornat, 1979]
I have that book!
It's much better to exhibit two page-long type expressions and mention
that they're not compatible!
(Quick, guess which programming language I'm referring to.)
What are pragmats? Pragmas and pragmata I could parse.
I have that book!The issue of whether van Wijngaarden grammars clarify or obscure
syntax descriptions is a matter of current debate: what is certain
is that up to now they haven't inspired any new kinds of parsing
mechanisms which can use their undoubted powers of expression.
[Bornat, 1979]
It's much better to exhibit two page-long type expressions and mention
that they're not compatible!
(Quick, guess which programming language I'm referring to.)
Martien Verbruggen said:Pragmats are compiler directives in ALGOL.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.