From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,c89924cb7c8c5a42 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-13 12:53:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: nma124@hotmail.com (steve_H) Newsgroups: comp.lang.ada Subject: Re: Who said strong typing is a benefit? Date: 13 Oct 2002 12:53:54 -0700 Organization: http://groups.google.com/ Message-ID: <8db3d6c8.0210131153.686a2123@posting.google.com> References: <8db3d6c8.0210121718.25cf55e4@posting.google.com> <%%8q9.21249$rz6.2550@sccrnsc02> <3DA96E28.9090104@worldnet.att.net> <87lm52eaa9.fsf@deneb.enyo.de> NNTP-Posting-Host: 63.203.198.30 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1034538834 5880 127.0.0.1 (13 Oct 2002 19:53:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Oct 2002 19:53:54 GMT Xref: archiver1.google.com comp.lang.ada:29754 Date: 2002-10-13T19:53:54+00:00 List-Id: Florian Weimer wrote in message news:<87lm52eaa9.fsf@deneb.enyo.de>... > Jim Rogers writes: > > > My favorite response to this kind of question is "what will Matlab do > > when you take the square root of a string?" > > >> sqrt ('@Q') > > ans = > > 8 9 > > >> > > Ugh. Consistent, but useless. > When not sure if the variable is string or not, use: "� help ischar ISCHAR True for character array (string). ISCHAR(S) returns 1 if S is a character array and 0 otherwise. See also CHAR." When using anything other than the basic data type in matlab (which is a double), then things do not look so pretty any more. But almost everything in matlab is a double (ok, except strings). from the simple loop counter variable to the 20 MB sparse matrix to the index into an array of only 5 elements, they are all of type double as default.