Weird huh? - what does fopen return?
#1

This isn't important, but if you know about it, enlighten us.

If you try:
Код:
new File:f;
f=fopen("ss.txt",io_read);
printf("%d",f);//you will get a warning here..
It will always return a 7-digit value starting with 5093.

On the other hand, if you try this:
Код:
printf("%d",fopen("ss.txt",io_read));
You will get: 51996***

The same thing is for all file modes..
Why?
Reply
#2

Just a value to identify the file in other functions. Why do you care anyway?
I also think the value is somehow determined from the current time, to make sure it is different at all times.
Reply
#3

It's a good thing to know about functions that you use all the time..


Well, the values go up and down.. no matter what the time is.. I don't really think that's the case though. At first I thought it was the location of the file, or the file name, but that made no difference..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)