On Sep 25, 2016, at 11:22 AM, Segher Boessenkool wrote:
On Sun, Sep 25, 2016 at 11:03:47AM -0400, Tarl Neustaedter wrote:
See section 7.3.5.2 of IEEE 1275.
$number ( addr len -- true | n false ) Convert a string to a number
number is much more useful. The description in 1275, well, sucks;
but it is a standard Forth word, and the description in the standard is fine.
But aside from that, I'm not sure what the hesitation to use ascii strings in drivers comes from. It's standard practice. Video drivers are usually specified with device strings like "/pci@xx/ display@1:1040x1024" or something like that, with the option argument being parsed at runtime (often it's a straight string comparison, but sometimes it needs more detailed parsing).
This isn't about device arguments. This is about using strings in properties to denote an array of integers; which is just a dumb thing to do.
Using a string can make things easier for the user. If someone needs to see what values are in the resolutions property, he or she could do so easily with data stored in a string format.