When comparing VO and X# programs we noticed a difference regarding a field in a buffered server object . But the mystery does not happen in the X#-Code, it happens in the VO-Code in a code part already programmed years ago.
Internally the field is created and referenced correctly with the symbol #ENDD
But in runtime the field symbol is #ENDDO!
I made a small console app and here is the result.
It seems that the compiler generates this replacement of symbols. In the macro execution this does not happen.
Is this possible?
And if yes, which symbols may be affected?
Do I see ghosts somewhere?
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Do I see ghosts somewhere?
assymbol("ENDD") is #endd in the runtime execution.
Do I see ghosts somewhere?
Hi Arne,
Wow, you're right, same goes with #ENDI (ENFID), #ENDC (ENDCASE), #METH etc! Apparently it replaces 4-letter abbreviations with the matching keyword. Obviously a bug in VO.
Wow, you're right, same goes with #ENDI (ENFID), #ENDC (ENDCASE), #METH etc! Apparently it replaces 4-letter abbreviations with the matching keyword. Obviously a bug in VO.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Do I see ghosts somewhere?
Hi Chris,
thank you for verifying. Of course I do not ask you to emulate this bug in X#. But I would like to verify, which symbols could be affected. Do you have a possibility to see, which symbols are substituted in VO?
thank you for verifying. Of course I do not ask you to emulate this bug in X#. But I would like to verify, which symbols could be affected. Do you have a possibility to see, which symbols are substituted in VO?
Do I see ghosts somewhere?
Hi Arne,
I cannot see it, but I think it's very clear from testing to conclude that ALL symbols that are 4 or more characters long and those characters are the first ones of ANY keyword (like #METH, #METHO, #PROCEDU etc) get substituted to the respective keyword.
And yeah, I agree, we have emulated a lot of weird behavior of VO in X#, but this one would be gong just way too far
I cannot see it, but I think it's very clear from testing to conclude that ALL symbols that are 4 or more characters long and those characters are the first ones of ANY keyword (like #METH, #METHO, #PROCEDU etc) get substituted to the respective keyword.
And yeah, I agree, we have emulated a lot of weird behavior of VO in X#, but this one would be gong just way too far
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Do I see ghosts somewhere?
Chris,
Meinhard was the last person that worked on VO. Maybe he can fix this in VO ?
Robert
Meinhard was the last person that worked on VO. Maybe he can fix this in VO ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Do I see ghosts somewhere?
It is not necessary to fix it in VO. Worse: Our program now relies on that behavior. It works correctly, if everything remains as it is. Fortunately only few parts with secondary importance should be involved. That's why I wanted to know for which symbols this happens so that I can search for them in the program and think about workarounds for X#.
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Do I see ghosts somewhere?
Hi Arne,
take a look at the VO "Built-in" Commands. I haven't tried all of them, but I've noticed that #Text doesn't expand to #Textblock.
regards
Karl-Heinz
take a look at the VO "Built-in" Commands. I haven't tried all of them, but I've noticed that #Text doesn't expand to #Textblock.
Code: Select all
? AsString( #begi ) , AsString ( #ifde ) , AsString ( #ifnd ) , AsString ( #fiel ) , AsString ( #decl ) , AsString ( #text )
Karl-Heinz
- Attachments
-
- Commands.png (24.95 KiB) Viewed 637 times
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Do I see ghosts somewhere?
Bingo!
the "built-in" commands show this behavior if at least 4 characters have been set. Exceptions: the commands with a blank containing and textblock.
Here is a list of 55 symbols, that are automatically transformed. Interesting how many secrets we still can discover for VO at the end of its lifecycle.
ACCE -> ACCESS
ACCES -> ACCESS
ASSI -> ASSIGN
ASSIG -> ASSIGN
BEGI -> BEGIN
CLAS -> CLASS
DECL -> DECLARE
DECLA -> DECLARE
DECLAR -> DECLARE
DEFI -> DEFINE
DEFIN -> DEFINE
WHIL -> WHILE
ENDI -> ENDIF
ENDD -> ENDDO
FIEL -> FIELD
FUNC -> FUNCTION
FUNCT -> FUNCTION
FUNCTI -> FUNCTION
FUNCTIO -> FUNCTION
GLOB -> GLOBAL
GLOBA -> GLOBAL
LOCA -> LOCAL
MEMV -> MEMVAR
MEMVA -> MEMVAR
METH -> METHOD
METHO -> METHOD
PARA -> PARAMETERS
PARAM -> PARAMETERS
PARAME -> PARAMETERS
PARAMET -> PARAMETERS
PARAMETE -> PARAMETERS
PARAMETER -> PARAMETERS
PRIV -> PRIVATE
PRIVA -> PRIVATE
PRIVAT -> PRIVATE
PROC -> PROCEDURE
PROCE -> PROCEDURE
PROCED -> PROCEDURE
PROCEDU -> PROCEDURE
PROCEDUR -> PROCEDURE
PUBL -> PUBLIC
PUBLI -> PUBLIC
RESO -> RESOURCE
RESOU -> RESOURCE
RESOUR -> RESOURCE
RESOURC -> RESOURCE
RETU -> RETURN
RETUR -> RETURN
STAT -> STATIC
STATI -> STATIC
STRU -> STRUCTURE
STRUC -> STRUCTURE
STRUCT -> STRUCTURE
STRUCTU -> STRUCTURE
STRUCTUR -> STRUCTURE
the "built-in" commands show this behavior if at least 4 characters have been set. Exceptions: the commands with a blank containing and textblock.
Here is a list of 55 symbols, that are automatically transformed. Interesting how many secrets we still can discover for VO at the end of its lifecycle.
ACCE -> ACCESS
ACCES -> ACCESS
ASSI -> ASSIGN
ASSIG -> ASSIGN
BEGI -> BEGIN
CLAS -> CLASS
DECL -> DECLARE
DECLA -> DECLARE
DECLAR -> DECLARE
DEFI -> DEFINE
DEFIN -> DEFINE
WHIL -> WHILE
ENDI -> ENDIF
ENDD -> ENDDO
FIEL -> FIELD
FUNC -> FUNCTION
FUNCT -> FUNCTION
FUNCTI -> FUNCTION
FUNCTIO -> FUNCTION
GLOB -> GLOBAL
GLOBA -> GLOBAL
LOCA -> LOCAL
MEMV -> MEMVAR
MEMVA -> MEMVAR
METH -> METHOD
METHO -> METHOD
PARA -> PARAMETERS
PARAM -> PARAMETERS
PARAME -> PARAMETERS
PARAMET -> PARAMETERS
PARAMETE -> PARAMETERS
PARAMETER -> PARAMETERS
PRIV -> PRIVATE
PRIVA -> PRIVATE
PRIVAT -> PRIVATE
PROC -> PROCEDURE
PROCE -> PROCEDURE
PROCED -> PROCEDURE
PROCEDU -> PROCEDURE
PROCEDUR -> PROCEDURE
PUBL -> PUBLIC
PUBLI -> PUBLIC
RESO -> RESOURCE
RESOU -> RESOURCE
RESOUR -> RESOURCE
RESOURC -> RESOURCE
RETU -> RETURN
RETUR -> RETURN
STAT -> STATIC
STATI -> STATIC
STRU -> STRUCTURE
STRUC -> STRUCTURE
STRUCT -> STRUCTURE
STRUCTU -> STRUCTURE
STRUCTUR -> STRUCTURE
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Do I see ghosts somewhere?
Hi Arne,
Here are a few more
regards
Karl-Heinz
Here are a few more
Code: Select all
? AsString ( #ifde ) // IFDEF
? AsString ( #ifnd ) // IFNDEF
? AsString ( #brea ) // BREAK
? AsString ( #sequ ) // SEQUENCE
? AsString ( #reco ) // RECOVER
? AsString ( #usin ) // USING
? AsString ( #inhe ) // INHERIT
? AsString ( #pasc ) // PASCAL
? AsString ( #clip ) // CLIPPER
? AsString ( #memb ) // MEMBER
? AsString ( #unio ) // UNION
? AsString ( #alig ) // ALIGN
? AsString ( #exte ) // EXTERN ?
// and of course the datatypes:
?
? AsString ( #usua ) // USUAL
? AsString ( #arra ) // ARRAY
? AsString ( #floa ) // FLOAT
? AsString ( #real ) // REAL4
? AsString ( #dwor ) // DWORD
? AsString ( #shor ) // SHORTINT
? AsString ( #long ) // LONGINT
? AsString ( #stri ) // STRING
? AsString ( #symb ) // SYMBOL
? AsString ( #code ) // CODEBLOCK
? AsString ( #obje ) // OBJECT
? AsString ( #logi ) // LOGIC
?
Karl-Heinz