Archive of UserLand's first discussion group, started October 5, 1998.
Answers to Mr. Nitpicker
Author: Dave Winer Posted: 1/14/1999; 4:40:18 PM Topic: Scripting on Windows Msg #: 2135 (In response to 2134) Prev/Next: 2134 / 2136
Thanks for asking these questions. I'm going to take guesses at some of these answers, don't consider them final at this time please.
1. Is "boolean" a distinct data type, or can boolean values be interchanged with integers (e.g. zero=false, non-zero=true)?
Yes, boolean is a distinct data type. Some languages/environments allow for an easy coercion from zero to false and one to true, but if you mean true, send a boolean type with the value true, so your intent can't possibly be misunderstood.
2. What is the legal syntax (and range) for integers? How to deal with leading zeros? Is a leading plus sign allowed? How to deal with whitespace?
An integer is a 32-bit signed number. You can include a plus or minus at the beginning of a string of numeric characters. Leading zeros are collapsed. Whitespace is not permitted. Just numeric characters preceeded by a plus or minus.
3. What is the legal syntax (and range) for floating point values (doubles)? How is the exponent represented? How to deal with whitespace? Can infinity and "not a number" be represented?
This is one that I'm not sure about and want to do some investigation. I don';t believe we support exponent notation in Frontier. There is no representation for infinity or negative infinity or "not a number" at this time, but let's talk about it.
4. What characters are allowed in strings? Non-printable characters? Null characters? Can a "string" be used to hold an arbitrary chunk of binary data?
Here's where I'm going to take a guess. The XML gurus will certainly correct me if I'm wrong. Any characters are allowed in a string except < and &, which are encoded as < and &. A string can be used to encode binary data.
5. Does the "struct" element keep the order of keys. Or in other words, is the struct "foo=1, bar=2" equivalent to "bar=2, foo=1" or not?
The struct element does not preserve the order of the keys. The two structs are equivalent.
6. Can the "fault" struct contain other members than faultCode and faultString? Is there a global list of faultCodes? (so they can be mapped to distinct exceptions for languages like Python and Java)?
Yes, a fault can contain other members, and in general all the structures can. Suggest for now that if you are going to add elements that you post a message here explaining what they are and maybe they'll be useful to others. The fault codes are up to the server.
7. What timezone should be assumed for the dateTime.iso8601 type? UTC? localtime?
This page was archived on 6/13/2001; 4:47:17 PM.
© Copyright 1998-2001 UserLand Software, Inc.