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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sys(1004)

Status
Not open for further replies.

Gilesy

Programmer
Jul 2, 2002
40
0
0
GB
Hi all
Does any body know what this is for? it returns a string like "16756543"

Thanks
 
I can't find any documentation on 1004 - but I THINK it indicates some kind of memory level.



Regards

Griff
Keep [Smile]ing
 
Gilesy,

This is not documented, but it returns the number of seconds since midnight. It's similar to SECONDS(), except that it returns a string rather than a number.

This raises two questions:

- How did you come across this function?

- If you didn't know what it was for, why did you want to use it?

Mike


Mike Lewis
Edinburgh, Scotland
 
Mike - if that is right, how come mine [sys(1004)] returns a number that goes up and down?



Regards

Griff
Keep [Smile]ing
 
I think it's some kind of buffers remaining ...

No, it's memory USED by VFP - if you open tables and projects it INCREASES!

Regards

Griff
Keep [Smile]ing
 
Griff,

how come mine [sys(1004)] returns a number that goes up and down?

Obvious, really. It's because I was wrong.

Mine seems to stay the same if I keep executing it repeatedly. If I execute some other commands in between, it goes up. If I do a CLEAR ALL and RELEASE ALL, it goes down.

Mike


Mike Lewis
Edinburgh, Scotland
 
Sorry Mike, our answers overlapped.

I never thought of trawling the the SYS functions for interesting ones before!

I found 1014 on MS - it purges memory buffers.

Regards

Griff
Keep [Smile]ing
 
I think it is related to memory.

In just playing around it looks like there are other undocumented SYS() commands. e.g. repeated ?SYS(1005) seems to create a 5 character number that auto-increments by 1 in VFP 7.

Brian
 
Not always by one in VFP 6

Issue a 'clear' and it jumps

Regards

Griff
Keep [Smile]ing
 
I think sys(1104) purges memory buffers...

Brian
 
Doh, I miss typed it!

Regards

Griff
Keep [Smile]ing
 
I don't know what it is either, but it's been in FoxPro since at least FP 2.0! (I just checked.) And it appears to function the "same" in each version since, although the numbers are all different. [surprise]

Rick
 
Somebody put this into our code. He isn't with us anymore so I didn't know if it was deliberate or not and what it was supposed to do.

I'm going to rewrite it anyway.


Thanks Guys!!
 
Nothing!

It's just one line: <var> = sys(1004)

But nothing is done with <var>. I had wondered if it was a memory purge type thing. Or if he was testing for something during developing.

I just wonder what else there is in Fox that is undocumented and may be useful - if we knew what it was!

Thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top