Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is PICTURE "999999.99"?

Status
Not open for further replies.

Mike555

Technical User
Feb 21, 2003
1,200
US
I'm working with a VFP6 report which contains several instances of code that looks like this...
Code:
?? [i]variablename[/i] [b][blue]PICTURE[/blue][/b] "999999.99"
What exactly does the 'PICTURE' command do here? I've tried searching but came up with nothing. Thanks.
 

It dictates the format of whatever number is in variablename.

For example:

x = 12345
? x picture "99999.99"

would display 12345.00, whereas

? x picture "99,999.9"

would do 123,45.0.

Hope that makes sense.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike(s),
And to give a historical perspective, this is what dBase III used before Fox Software introduced the TRANSFORM() function!

Rick

P.S. Did I get that right Tamar?
 
Thanks for the clarification gentlemen!
 

Rick,

this is what dBase III used before Fox Software introduced the TRANSFORM() function! .... Did I get that right Tamar?

Actually, no ... no quite.

dBASE III had @/SAY ... PICTURE, but not ? .. PICTURE.

dBASE IV introduced ? ... PICTURE, and one of the later versions of Foxbase (later than 2.10) copied it.

Also, it was dBASE IV that introduced TRANSFORM(). Fox copied it in Foxbase 2.10.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
I didn't know that. I always thought FoxPro "improved" dBASE functions, not "copied" them... ;-)
 

TheRambler,

I always thought FoxPro "improved" dBASE functions, not "copied" them

The early versions of FoxBase were designed to exactly mimic dBASE, bugs and all. Since then, of course, Fox has consistently improved the language, but many of the early bugs and bad designs are still there, because of the need for backward compatibility.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Actually, the early versions of FoxBase were designed to mimic what the DBase 3 help file indicated and, in many cases, eliminated bugs in DBase. As a result, programs that had work arounds for DBase bugs didn't work right in FoxBase because the bugs weren't there.

Regards,
Jim
 

Jim,

You're probably right, although I can't think off-hand of any examples where Foxbase eliminated a dBASE bug. Do you know of any?

I can think of examples of things that didn't work in dBASE and which Fox explicitly decided not to make work in Foxbase. This was especially true of ver. 2.10, which came out after Ashton-Tate had announced the features of dBASE IV.

The best example is the Float data type. AT announced it for dBASE IV, but never implemented it. You could declare a field as Float, but it ended up as an ordinary numeric. Foxbase did exactly the same. What's more, that's still the case in VFP 9.0.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

No, I can't remember any specifically. But, at the Ashton-Tate Meeting of The Minds conference in LA, they invited Fox to the vendor exhibition thinking that Fox was just a compiler for DBase. Dr. Dave offered to demonstrate how FoxBase could compile existing DBase code and have it run faster and faultlessly. He was really put out when he found code that worked in DBase didn't in Fox - all because the code dealt with known bugs in DBase that weren't there in Fox. I think it was mostly a matter of functions returning the opposite logical value from what help claimed they returned. It was hilarious!

Regards,
Jim
 
Since this one seems to be rambling a bit -
Did anyone ever use DBaseII for CP/M on Dec Rainbow?
 

White,

Did anyone ever use DBaseII for CP/M on Dec Rainbow?

I used dBaseII for CP/M on a Superbrain, a Xerox 820, and one or two others.

The problem with the DEC Rainbow, as I recall, was its hard-sectored disk drives (that's floppy discs, of course). It was impossible to convert them to or from other formats through software, which made it a very unactractive platform.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
OOps....
We all bust be very old <G>.
My first steps with dBase was dBaseII-version.
I used it with CP/M which Ran on a Spectravideo 734.
Was in 1987? Gold old days with Wordstar as best wordprocessor with all those funny dot-commands.
-Bart
 
Mike,
My first steps in CP/M were in 1985. Pretty sure for I used an MSX-machine holding also CP/M and MSXDOS as OS.
But you might be right that dBII was retired those days. In fact it was quit exciting to use the 'professional' programs like wordstar, datastar and another xxxstar I forgot the name of and of course Multiplan.....
For the records a bit history:
It was about 1978 that Mr. Wayne Ratliff decided to create a program to help him fill in the 'toto'. One year later he had written 'Vulcan'. One year later again he met George Tate who made this 'invent' famous. 'Ashton'was just a fantasy 'marketing' name. The British magazine Practical Computing did write about dBase as belonging to the upper 10 of new facts in PC-world.
Info taken from a Dutch book 'Manual for dBaseII CP/M written in 1983 by Pim Oets.
-Bart
 
Bart,

You certainly came to dBASE and CP/M very late. I think CP/M had almost disappeard by 1984. WordStar was definitely still around in '85, but I'm not so sure about DataStar. My memory is that it was killed off my dBASE.

It was about 1978 that Mr. Wayne Ratliff decided to create a program to help him fill in the 'toto'.

I think your dates might be a couple of years off. I think Ratliff had already written Vulcan in '77. He met Tate early in '78. But you're right about the other points.

The British magazine Practical Computing did write about dBase as belonging to the upper 10 of new facts in PC-world.

Actually, it was me that wrote that article in Practical Computing.

Info taken from a Dutch book 'Manual for dBaseII CP/M written in 1983 by Pim Oets.

Did you ever see Gegevens en Relaties: Een praktische inleiding database management with dBASE en SQL? I co-authored and translated the English version of that book around 1990, but by that time dBASE was already virtually dead.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
I owned a DEC Rainbow, but I wasn't doing database work in those days. I had a word processor I loved called "The Final Word" from Mark of the Unicorn.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top