Article View: comp.lang.misc
Article #6634Strong/Weak typing
From: Mark Streich
Date: Thu, 11 Jan 1990 21:26
Date: Thu, 11 Jan 1990 21:26
26 lines
1381 bytes
1381 bytes
While this newsgroup seems to cover many research languages, I would like
to mention one that is used by an awful lot of people: dBASE
You don't need to declare types of variables/functions/parameters, and arrays
can be polymorphic with each element being a different type.
For example, you can write a function as follows:
function addtwo
parameters a,b
return a+b
If you call it as addtwo(1,2) you get the result 3. If you call it with
addtwo("abc","def") you get the result "abcdef".
As for arrays, you can do something like this:
dimension arr[5]
arr[1] = 1
arr[2] = 1.23
arr[3] = "abc"
arr[4] = .f. (boolean values)
arr[5] = ctod("09/07/61") (date values)
While many implementations of the language are interpreters, some are
compilers. (for DOS, Mac, Unix, Vax, etc.)
So, you see, polymorphism isn't such an ivory tower topic.
Technical Details
Message-ID:
<15553@boulder.Colorado.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!uakari.primate.wisc.edu!ames!ncar!boulder!tigger!streichShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!uakari.primate.wisc.edu!ames!ncar!boulder!tigger!streich From: streich@tigger.colorado.edu (Mark Streich) Newsgroups: comp.lang.misc Subject: Strong/Weak typing Message-ID: <15553@boulder.Colorado.EDU> Date: 11 Jan 90 21:26:26 GMT Sender: news@boulder.Colorado.EDU Reply-To: streich@tigger.colorado.edu (Mark Streich) Distribution: na Organization: University of Colorado, Boulder Lines: 26