[Info-vax] Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared
Scott Dorsey
kludge at panix.com
Sun Jun 9 14:43:46 EDT 2019
Bob Gezelter <gezelter at rlgsc.com> wrote:
>
>Quite. Many miss the point that a "type" definition is more than storage sp=
>ace, it is also semantics. INTEGER*4 and REAL*4 (FORTRAN) are not the same,=
> even though they reserve the same amount of memory.
Right, and this was one of the interesting advances that we can attribute
to Grace Hopper. We can treat the same block of memory in different ways....
but most of the time we want to be treating it the same way every time and
typing allows us to make sure that we are doing that.
>In C, pointers to different items (e.g., struct, long, long long, unsigned =
>long long) may be the same size, but are not the same "type" for type match=
>ing purposes, hence the use of "void *" in many contexts.
Right. It used to be very common for people to use integers as pointers and
vice-versa and oops.... now I want to port the code to a machine with a
different address length..... now my code doesn't work.
>In BASIC, BASIC$QUADWORD is a record of two longwords, whereas QUAD is a si=
>gned quadword. Both refer to 64-bit memory areas, but they are not, in the =
>language context, equivalent. If nothing else, the syntax is different, whi=
>ch will cause a compilation error.
If you write a value in one format and you read it in another, the value
will be changed in the process. Just as if you wrote a thing as a signed
integer and read it as an unsigned integer. Maybe you might want to do
this someday, but most of the time when people do such things it is
inadvertent and undesired so the compiler flags it.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
More information about the Info-vax
mailing list