Hi all,
Thank you Terry for writting - better than I can do - this report.
Terry is nearly 100% right. The missing 1% is in the fact that:
a. I wasn't sure (but I didn't test it - no more test on LR/ no more
reports on LR) of what I readed;
b. This is symptomatic of the whole document: full of errors, things
that lead the reader into errors.
I saw questions (in the Getting Started List) with a space after a dot
in a multi-dot command where the questioner wasn't understanding why its
code (from the LR) does not works. Some people follow exactly what they
read in the LR.
Example: <command>. <command> <arg_list>
If you care enough of the REALbasic documentation quality, make pressure
on RS; you have the choice: use the reporting system or send mails to
the people; it's up to you.
At last, the "I prefer bug squashing" argument seems to not work at all.
REALbasic is a whole: the application, the examples, the documentation.
It is judged as is: if one part fails, the whole can be rejected / bad
feeling goes to the whole :(
I am tired to send reports after reports and nothing (or so few) is done...
Emile
Subject: Re: About the Val Function (& LR)
From: Terry Ford <[EMAIL PROTECTED]>
Date: Mon, 08 May 2006 16:22:15 -0700
On May 8, 2006, at 8:26 AM, Emile Schwarz wrote:
I do not really understand what I read in the Language Reference,
Val Function entry:
<quote>
Val Function
Returns the numeric form of a String.
<some text snipped>
That is, " &hFF" returns 0, but "&h FF" returns 255.
</quote>
Here's what I do not understand:
<That is, " &hFF" returns 0, but "&h FF" returns 255.>
Why ?
Very simple. You cannot have a space or spaces in a Val Function
string immediately before &h, &c or &b. It reacts the same as Val(" ")
[space].
For example, " 34 Items" works but " ", " &h, etc all evaluate
to a non numeric character and result in a zero result.
The OLR examples in 2005 and 2006 have a text copying error in the
last two example lines of the first set. They have an added space
before the ampersand. I have noticed spacing errors in many of the
other OLR items in the new html OLR. I think it might have been
caused by scanning errors.
The feedback report is:
-----------
<http://www.realsoftware.com/feedback/viewreport.php?reportid=xkozqbfa>
The example in the Online Language Reference shows a space before the
Ampersands below which will return a result of 0 in both cases.
2005/6 OLR
n = Val("' &hFFF") //returns 4095
n = Val(" &b1111") //returns 15
2005/6 PDF versions and the 5.5.5 OLR are correct.
n = Val("&HFFF") //returns 4095
n = Val("&b1111") //returns 15
-----------
A quick test is to place a space before the &cFFFFFF background color
of a window. It will immediately be set to Black (&c000000) on a return.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>