#include "live\mpReRv1100.c" does not work

Posted By: MatPed

#include "live\mpReRv1100.c" does not work - 05/16/21 13:05

Hi,
#1
in zorrofix.ini I set:
StrategyFolder = "‪F:\OneDrive\ZorroStrategy\"
Correctly Zorro look into that dir for script at launch time.

In the script I use:
#include "live\mpReRv1100.c"

I expect that Zorro for the script in ‪F:\OneDrive\ZorroStrategy\live\ directory, but that's not the case.
If I am wrong please explain it. In the second case is a bug.

#2
Another weird behavior is that if you set StrategyFolder = "‪F:\OneDrive\ZorroStrategy", without the final slash the path is set to the parent directory F:\OnedDrive. That'3 not the case using the set HistoryFolder

#3
if set StrategyFolder to a different location and try to create a new script from zorroconsole, you get the message shown in the pic attacched
Thank You




Attached picture 2021-05-16 15_26_46-zorro.chm - ExtraChm - NOT REGISTERED.png
Posted By: AndrewAMD

Re: #include "live\mpReRv1100.c" does not work - 05/16/21 14:59

In C, the backslash ‘\’ is an escape. To indicate a backslash in a string, you need two backslashes, like this: ‘\\’

So everywhere where you have a single backslash, you in fact need two backslashes.
Posted By: jcl

Re: #include "live\mpReRv1100.c" does not work - 05/17/21 06:50

In fact there is an exception: escapes are used for string constants, but not for precompiler statements. Don't ask me why. It's a C convention.

In Zorro 2.37 the precompiler knows the StrategyFolder, but not in earlier versions. If in doubt, always use absolute paths.
Posted By: MatPed

Re: #include "live\mpReRv1100.c" does not work - 05/17/21 11:23

Originally Posted by jcl

In Zorro 2.37 the precompiler knows the StrategyFolder, but not in earlier versions. If in doubt, always use absolute paths.


Absolute path is not my desired solution, I am using 2.35.8. I will give a look at 2.37. Thank You
© 2024 lite-C Forums