Hey therob,
I started to read through your code. I have not read it all. This is just my humble opinion.
Just quoting some of your code
Code:
;blablabla
$=Open (1,$input,2)
While Not @error
:readAline
$Line = ReadLine(1)
;blablabla
For $c = 0 to Len($Line)
$Char = SubStr($Line, $c, 1)
;blablabla
If $Char = ";" And Not ($quote1 = 1 Or $quote2 = 1)
Goto readAline
EndIf
;blablabla
Loop
;blablabla
You (try to) open the file $input and if no error is set, you start a loop.
Now at the end of that first loop, once again is tested if an error has been set. But do you know which line in your code is setting an error?
(Most probably it will be the readline that will set an error, but I am not sure.)
I think, what you want to do is test the error of readline
So
Code:
$=Open (1,$input,2)
If @ERROR
Quit @ERROR
EndIf
$Line = ReadLine(1)
While NOT @error
;Do stuff
$Line = ReadLine(1)
Loop
Now the @error of readline is tested
You have a GOTO and a LABEL. I think it is bad practice using GOTO. In Batch files, it was unavoidable using this stuff. But here, you have more options. Try p.e. to think in Functions.
On this line
$Char = SubStr($Line, $c, 1)
The first time, when $c = 0, you try to catch the character at the 0th position, which is non-existant...
I think the line just above it should read
For $c = 1 to Len($Line)
These are some first thoughts. Now I am not really a skilled coder. So please correct me if you do not agree or if you think I am mistaking.
Regards,