The preservation of numerical precision

A customer reported a difference in behavior when executing some code in the design time and in a COM dll.   You can run this code to see it: (use the server created from http://blogs.msdn.com/calvin_hsia/archive/2004/06/18/159550.aspx)   ?SET(“Decimals”) SET DECIMALS TO 15 num=12.45678901234567890 ?num ox=CREATEOBJECT(“t1.c1”) *ox.mydocmd(“set decimals to 15”) ?ox.myeval(“p2”,num)    && just evaluate the parameter and…

1

The return value of a method can be intercepted using BindEvent

Here’s a blog post that I wrote a long time ago, but forgot to publish.   Marco Cenzato commented on Why doesn’t my form close?     Here is another case; what do you think: is related? ** Comment the define and rerun the program #Define USE_BINDEVENT Activate Screen Clear Local oForm oForm = NewObject(‘MyForm’)…

1

Is this a Vista bug?

A customer reported a crash of a VFP application while running under the new version of Windows: Vista. The customer code attempted to automate the configuration of the web server (See Automating Web Site Administration Using IIS).   Specifically, there was a scenario under which the user code calling GETOBJECT(“IIS://LOCALHOST/W3SVC/1/ROOT”) would crash. At the time,…

4

Write your own hangman game

Many years ago (1985) I wrote a C program to play Hangman. I had decoded a word processor spelling dictionary for my word source.   More recently, I have encoded 2 spelling dictionaries for general purpose use: 1 with 171201 words, the other with 53869. There’s some pretty serious compression to get them both into…

7