Page 1 of 1

REJECTED: WriteDictionary

PostPosted: Sat Jan 19, 2013 7:37 pm
by Slowdown
from the manual,
Function WriteDictionary(Argument As Dictionary, FilePathOrURL As String) As Boolean

But use here,
Code: Select all
WriteDictionary(AppConfig, ConfigFile)

No error's reported and no problems but it isn't correct.

Re: WriteDictionary

PostPosted: Sun Jan 20, 2013 12:36 am
by Henning
it isn't correct


What is 'it'?
Isn't the data written as expected, or what?

I've seen that Functions (sometimes/always) need a target for the returnvalue, like:
Dim dummy As Boolean
dummy = WriteDictionary(AppConfig, ConfigFile)

/Henning

Re: WriteDictionary

PostPosted: Sun Jan 20, 2013 5:53 am
by Slowdown
I've seen that Functions (sometimes/always) need a target for the returnvalue

That is what i mean in this case.
I use it without a returnvalue and the compiler isn't complaining.
The function itself works further as expected.

Re: WriteDictionary

PostPosted: Mon Jan 21, 2013 8:33 pm
by berndnoetscher
Slowdown wrote:
I've seen that Functions (sometimes/always) need a target for the returnvalue

That is what i mean in this case.
I use it without a returnvalue and the compiler isn't complaining.
The function itself works further as expected.



This is not a bug - it is a feature :-). You may not use a return value.

Re: REJECTED: WriteDictionary

PostPosted: Mon Jan 21, 2013 8:37 pm
by Slowdown
You may not use a return value.

But Q7B isn't complaining if i do use a return value :D