>
I didn't find a mistake, but there are a few details which I would code different - consider this my personal preferences.
>>
>All good suggestions -- Thanks! I never use the inlist command (don't know why, just never have) and I find it hard to break the "multiple replace commands" habit with just one replace statement. Maybe you couldn't do that in foxbase+????
I used dBASE III, and then FoxPro 1.0 - I never used FoxBase.
If I remember correctly - and it is quite a while ago! - dBASE allowed multiple fields in REPLACE.
inlist() is more recent - FoxPro 2.x, perhaps, but I am not so sure.
Another command that can often save you some characters is between():
Instead of:
x >= 0 and x <= 10
You can use:
between(x, 0, 10)
In a SQL - SELECT command, you can directly use
where x between 0 and 10.
I recently wrote an article in UT Magazine about coding shortcuts - some of them a little crazy.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)