[nos-bbs] jnos for dos

Barry Siegfried k2mf at k2mf.ampr.org
Thu Apr 19 15:36:09 EDT 2007


[Glenn Thomas <glennt at charter.net> wrote]:

> Here are my answers.  Remember, dumb looks are always free! ;-)

:)

> Strong/weak typing refers to variables passed as function (or
> subroutine in other languages) arguments.  In weak typing, no
> checks are done at compile time, the parameter types are locally
> declared and taken as gospel by the compiler.  Thus with weak
> typing it's allowed to call a function with an argument that
> is of type "double" and have the function treat it as a "long".
> Languages that allow this include assembler, FORTRAN (*sigh*)
> and C.
>
> In strong typing, the compiler will check parameter types between
> the call and the target and declare an error if they don't match.
> You can usually still do a "mixed mode" call, but the compiler will
> force you to at least cast the parameter in the call to the correct
> type.  Languages with this characteristic include C++, Ada, HAL/S
> and (I think) PL/1.
>
> As I said before, there's nothing inherently wrong with this. It's an
> issue because mixed mode calls can result in very obscure bugs when
> it is used unintentionally.

All is completely understood.  In some cases, "weak" typing can
actually be ok when the variable being recast does not lose any
"significance" (like from an 8-bit integer to a 16-bit integer and
vice versa where you *know* the values will be ok).  And in 'C'
(the "weak" one) there actually *are* situations where the compiler
will barf if you don't properly cast the variable being passed in
the call.  This happens if you are passing a pointer through a
variable in a call to a subfunction where that variable is supposed
to be a short and vice versa.

[snip]

> > > One other thing about Borland, I think that 3.1 was the last release
> > > that included an assembler.  After that it was an option, so be sure
> > > to save the object files from assembly language modules.
> >
> > I believe you're right about that, which I guess means it is too bad
> > for people who would need to change any assembly code in these modules.
>
> Yeah. I recall there being a set of object modules for those routines,
> so you could build without an assembler.  In my case, I had the v1.5
> and v2.0 versions of TASM, but decided that I'd rather not fight with
> the assembly code every time a new version of JNOS came out, so I
> invested in the latest version of TASM.  It wasn't very cheap, but
> at least I could do a "make clean" without worrying.  OTOH, I don't
> recall having to change any of the assembler code other than what
> was required for the older assemblers.

I have actually done a bit of work on the assembly code in my source
code to implement some things that previous revisions didn't have.
I think I would be lost without TASM.  :)

Thanks for taking the time to reply!

73, de Barry, K2MF >>
           o
          <|>      Barry Siegfried
+---------/-\---------------------------+
| Internet | bgs at mfnos.net              |
| HomePage | http://www.mfnos.net/~bgs  |
+----------+----------------------------+
| Amprnet  | k2mf at k2mf.ampr.org         |
| PBBS     | k2mf at k2ge.#cnj.nj.usa.noam |
+----------+----------------------------+




More information about the nos-bbs mailing list