xsharp.eu • FPT bug or not
Page 1 of 3

FPT bug or not

Posted: Sat Mar 05, 2022 6:12 pm
by Horst
Hello

I am using dbAdministrator Lite 3.27 to work with dbf's and in the last months i allways had trouble to make modify structure with this tool on 2 files i allways use. When i tried to change the structure the Administaror crashed and said the FPT file is corrupt.

While the dbf was used all the time , there was no missing data and all works normal.

Now i found out why the tool is crashing.
I am recycling the records in this dbf and i write SELF:FIELDPUT (nCnt,"") into the Memofield to make it empty.
After that my dbf tool cant modify the structure of the dbf anymore.
I tried the same with VO2.7 and i can still use my dbf tool.
So there is a different between X# and VO and i dont know the side effects so i am a little bit scared.

Horst

btw
DO CASE
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "C" ; SELF:FIELDPUT (nCnt," ")
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "L" ; SELF:FIELDPUT (nCnt,FALSE)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "M" ; SELF:FIELDPUT (nCnt,Space (10)) // Test geändert von "" auf space (10)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "N" ; SELF:FIELDPUT (nCnt,0)
CASE SELF:FieldInfo(DBS_TYPE, nCnt) = "D" ; SELF:FIELDPUT (nCnt,CToD (""))
ENDCASE
Here is a switch the better solution right ???

FPT bug or not

Posted: Sat Mar 05, 2022 9:29 pm
by FFF
Horst,
first: i hope this is play-data - you are aware, that there quite a lot of address data you put here in the wild?
second: does your sample run for you? Here i get a crash with a "X#-Error", unless i comment the "close databases" command.
third: yes, also my cmVODBx32 sees corruption, that's for the wise to find out...
fourth: why bother with recycling? I'd call a Pack() every now and then :)

BTW, @Chris: found by chance: if i add a "wait" in front of the other code, i get a simple "Compilation failed" from Xide ;)

FPT bug or not

Posted: Sun Mar 06, 2022 12:02 am
by Chris
Hi Horst,

Thanks, I see the problem, will log this for Robert to look into it. In the meantime, please put a space, instead of an empty string to the memo field.

Karl, not sure what you mean, where did you pit the wait?

.

FPT bug or not

Posted: Sun Mar 06, 2022 6:40 am
by FFF
I used Horst's "descend" sample app, pasted the new start, and commented the old code a bit sloppy, so the "wait" stayed active...

FPT bug or not

Posted: Sun Mar 06, 2022 8:14 am
by Chris
Hi Karl,

Can you send me the new prg as it is now, caused this compiler error?

.

FPT bug or not

Posted: Sun Mar 06, 2022 9:27 am
by FFF
Good morning!
Watch your spam ;)

FPT bug or not

Posted: Sun Mar 06, 2022 12:27 pm
by Chris
Hi Karl,

Got it, thanks! :)
But I can't reproduce the problem, I get a normal parser error message for the WAIT outside of an entity here.
Maybe it's something to do with the new build, please give it a test again if you can when the new build gets released.

.

FPT bug or not

Posted: Fri Mar 11, 2022 8:10 am
by Karl-Heinz
Hi Chris,

- i don´t know how Karl´s sample exactly looks like, but i can still reproduce the "compilation failed" error with 2.11.0.1

Code: Select all

FUNCTION Start( ) AS VOID
? "Done" 
RETURN

END FUNCTION

WAIT // <----  compilation failed 
when i use instead of WAIT another simple command like SKIP USE CLOSE QUIT PACK REINDEX RECALL or ZAP, the same "compilation failed" msg is thrown.

- This code produces an:

error XS0111: Type 'XSharpError2.Exe.Functions' already defines a member called 'Start' with the same parameter types

Code: Select all

WAIT

FUNCTION Start( ) AS VOID
? "Done" 
RETURN

// END FUNCTION
- Another ( strange ) problem: While deleting/adding code in a viaef i suddenly see the error:

XS5001: Program does not contain a static 'Start' function suitable for an entry point Compilation failed (1 error)

the only code in the viaef is:

Code: Select all

FUNCTION Start( ) AS VOID
? "Done" 
RETURN
i doesn´t matter if i choose the fox or VO dialect. Do you see the same error when you try to compile the attached viaef ?

regards
Karl-Heinz

FPT bug or not

Posted: Fri Mar 11, 2022 8:17 am
by FFF
Karl-Heinz,
i see your error, too.
The only difference, i get the error XS5001: Program does not contain a static 'Start' function suitable for an entry point in all cases you presented...

FPT bug or not

Posted: Fri Mar 11, 2022 9:02 am
by Chris
Guys,

The problem with the Start() function is that the option "Response file only" in the app properties (General tab) is checked. This option does not pass any .prg files (neither compiler options like /lb /vo etc) to the compiler for compiling and expects you do it manually by putting the command line in the general compiler options textbox, typically using a "response file", an external file that contains the full compiler input. In this case nothing is passed to the compiler, so Start() was not found either. Guess it would be better if the compiler reported something like "no files passed in the command line"

About the "WAIT" problem, that's strange, here I always get a helpful compiler error message. Are you guys surely using the latest build? Maybe there's a more helpful message in the Output window?
WAIT_error.png
WAIT_error.png (16.21 KiB) Viewed 421 times