Working with files. - page 7

 
tol64:
If FILE_COMMON is not specified, the default will be in the local folder.

Are you saying that the FileCopy() function description in the Handbook is wrong? A parameter with a default value cannot come second if it is followed by parameters without default values. Not to mention that there are no default parameters in the description at all.

 
Yedelkin:

Are you saying that the FileCopy() function description in the Handbook is wrong? A parameter with a default value cannot come second if it is followed by parameters without default values. Not to mention the fact that there are no default parameters in the description at all.

Tried it. So far I can't say anything except: "Something is not quite clear with FileCopy()". :)

I'm already tired today and will try again with a fresh head tomorrow.

 

Anyway, the question remains: What flag should be set for the common_flag of FileCopy() if the file is located in a local folder?

 
Yedelkin:

Anyway, the question remains: What flag should be set for the common_flag of FileCopy() if the file is located in a local folder?

Hm. No flags are needed for local folder. And since the parameter is a union of flag bits, the absence of flags is 0.
 
TheXpert:
Hm. No flags are needed for local folder. And since a parameter is a union of flag bits, no flags -- 0
So just tell me: if a function has four non-optimal parameters, separated by commas, what should I put after the first comma and before the second one?
 
Yedelkin:
Just tell me: if a function has four comma-separated parameters, what should be specified after the first comma and before the second one?
And since a parameter is a union of flag bits, no flags -- 0
 
Yedelkin:
You just answer me then: if a function has four comma-separated non-optimal parameters, what should I put after the first comma and before the second?

If in doubt, make a constant, like

#define FILE_LOCAL 0

and write it.

 
sergeev:
And since a parameter is a union of flag bits, no flags -- 0
I'll repeat the question: if a function has four non-optimal parameters, separated by commas, what should I specify after the first comma and before the second? Explain to an idiot, if you don't mind.
 
TheXpert:

If in doubt, make a constant like

and write it.

Are you saying that, answering my question, you suggest putting just 0 between the first and second commas?

It's not that I "have doubts" - I see that there is no complete information on the situation I need in the Handbook, and words about "merging bits" - they don't mean anything to me. The function is declared with four parameters - so the question arises, what to specify as the second parameter.

 

Judging by the silence, the guess-it-yourself method is in action :) OK, we have come to the following conclusions:

The FileCopy() function description does not contain a flag corresponding to location of the file in a local folder, but there are no default parameters or instructions on what value to specify for the second parameter in case the file is located in the local folder.

I will write to the SD.

Reason: