[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dataframe and ischar
From: |
CdeMills |
Subject: |
dataframe and ischar |
Date: |
Tue, 17 Feb 2015 11:08:43 -0800 (PST) |
Hello,
I have a question about ischar applied to dataframe() objects. "dataframes"
try to mimic arrays, in particular when selecting a sub-part where all data
have the same type. In this context, using ischar returns true.
But this annoys me in the context of strcmp and strncmp: those functions
test their arguments with ischar() and iscellstr() and use slightly
different codes in both situations. If I use "ischar" on a dataframe
containing only strings, this succeeds, but the code in do_strcmp_fun fails.
OTOH, with
tt={"one", "two"; "three", "four"}; strcmp("one", tt)
the code uses the branch associated to the "is_cellstr" path. This means
that a cell array of strings is not considered as a char.
My question is: what's the philosophy of ischar with respect to an object
which tries to mimic a string array but whose engine behind uses cellstr ?
Should ischar return true for singleton element and false for more complex
arrangements ?
TIA
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/dataframe-and-ischar-tp4668638.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- dataframe and ischar,
CdeMills <=