Stuck with code not seen (executed)

Hi,

I have been pulling my hair out for a few hours for what is probably a stupid mistake I made.
I was doing my usual work of editing code/debugging/executing and, at some point I realized that nothing happened:
No chart display, no error messages, no parameters in the Param window, nothing. The program behaves as if the code was a blank page. For example the "Tools/Code check & profile" command returns nothing.
However the code corresponding to the chart is still visible and editable (mouse right click / Edit formula).
The code also appears in the "/Charts/Custom" folder as "Price (foreign 1)"
The other charts on the same sheet (Price, MACD, whatever...) behaved properly as usual.

I have the feeling that the solution is obvious but I am stuck as for now.

Problem found. It was a stupid mistake as expected !
There was an unusual character as the very beginning of the code (a "superscript Two" or something like that => ² ).
Strangely the Amibroker code parser did not generate any error. It just did nothing at all.
This character was so small and was immediately followed by other characters that it was barely visible on my large screen with a resolution of 2560 x 1440.

By the way, some time ago I also found an unusual behaviour of the parser: it did not like empty function definitions (with empty curly braces). I dont remember what happened though as it was not a big problem.

I just copy-pasted ² into AFL editor and it is automatically transformed to regular 2 so I don't have any idea how you could enter such character in the AFL editor.

Maybe you are using 3rd party editor.
It is advised to use built-in AFL Editor.

If you insist on using 3rd party editors you need to make sure they save the files with plain ASCII format, not Unicode, not UTF-8, not RTF, nor whatever else.

Non-ASCII encodings use various sequences of bytes for esoteric characters. Such sequences are never meant as input for the AFL parser.

Also empty parameter list works just fine:

function test()
{
  return 1;
}

printf("%g\n", test() );

Thank you for your response Tomasz.
I dont use any 3rd party editor. I have probably typed an unusual key combination inadvertently.
This wrong character appeared as a "superscript Two" but maybe some other different characters could have the same appearance. I had not attempted to save the initial wrong character and so have not tried to determine its code (it is probably not the same character that the one that appears on my previous post).

Just for curiosity I tried to replicate the problem:
When inserting this "superscript two" character (²) at different places in my source code, it sort of behaves like "an end of file". It prevents reading the code that follows it without generating any error. This character is not automatically replaced by a '2' character in my version of Amibroker.
This is really a minor issue and can probably be ignored.

How can anyone have slightest idea what "YOUR VERSION" is?

Like Tomasz mentioned, you should share all details like AB version/bit etc.

Also your OS/windows version and if you are using a different language or locale or something which isn't their usual US/English default.

Amibroker: 6.40.4 - Windows 10 64 bit Pro french version - Build 19045-4412

I did not give the version information because this is a very minor issue and I am no longer stuck. So for me this is over. I think it is very improbable that someone else would be stumped by this same issue.

Possible culprit is French locale, as that about the only thing that can affect keyboard entry to the editor.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.