[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: John W. Eaton
Subject: implicit_str_to_num_ok=1
Date: Fri, 9 Jul 1999 09:04:34 -0500 (CDT)

On 30-Jun-1999, Daniel Heiserer <address@hidden> wrote:

| Does anybody in this list runs with "implicit_str_to_num_ok=0"

It's the default, so I'm sure that many people use this setting.

| or lets say *REALLY* *NEEDS* "implicit_str_to_num_ok=0".

I think it is nice to know if a string is being treated as a numeric
object.  It is not so nice to have strings automatically converted to
numeric objects without warning.

| If this is not the case I would recommend to make
| "implicit_str_to_num_ok=1" the default and kick the feature
| "implicit_str_to_num_ok=0" out.

Sorry, it's not going to happen.

| Once I start fiddling around with strings this feature makes
| be absolutely sick, because I cannot handle the BASE-DATATYPE 
| of octave (The Matrix (not the movie ;-))) like a matrix
| because no matrix manipulation works on it as long as this
| dammed "implicit_str_to_num_ok=0" is set.

I don't think this is true.  Here are some examples of matrix
manipulations that do work on strings:

  GNU Octave, version 2.0.14 (i686-pc-linux-gnu).
  Copyright (C) 1996, 1997, 1998, 1999 John W. Eaton.
  This is free software with ABSOLUTELY NO WARRANTY.
  For details, type `warranty'.

  octave:1> s = ["these"; "are"; "strings"]
  s =


  octave:2> s'
  ans =

  s i
  e n

  octave:3> s(:,3)
  ans =


What matrix manipulations don't work?  If you think they should work
for strings, then maybe you should report the problems as bugs rather
than complaining on the help-octave list.

| I personally don't see ANY adavantage of "implicit_str_to_num_ok=0"
| except that the code tells me it makes no sense handling 
| a string like a matrix. Why the hell not?

Uh, because a string is not a numeric object?  Do you expect

  svd (string_object)

to do anything useful?  Wouldn't it be nice to have a warning if you
accidentally make this mistake in your code, rather than producing
garbage results?


Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see
Instructions for unsubscribing:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]