Do I see ghosts somewhere?

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
User avatar
ArneOrtlinghaus
Posts: 384
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Do I see ghosts somewhere?

Post by ArneOrtlinghaus »

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?
endd.png
endd.png (56.58 KiB) Viewed 348 times
User avatar
ArneOrtlinghaus
Posts: 384
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Do I see ghosts somewhere?

Post by ArneOrtlinghaus »

assymbol("ENDD") is #endd in the runtime execution.
User avatar
Chris
Posts: 4584
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Do I see ghosts somewhere?

Post by Chris »

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.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
ArneOrtlinghaus
Posts: 384
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Do I see ghosts somewhere?

Post by ArneOrtlinghaus »

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?
User avatar
Chris
Posts: 4584
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Do I see ghosts somewhere?

Post by Chris »

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 :)
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
robert
Posts: 4258
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Do I see ghosts somewhere?

Post by robert »

Chris,

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
User avatar
ArneOrtlinghaus
Posts: 384
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Do I see ghosts somewhere?

Post by ArneOrtlinghaus »

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#.
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Do I see ghosts somewhere?

Post by Karl-Heinz »

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.

Code: Select all

? AsString( #begi )  , AsString ( #ifde )  , AsString ( #ifnd ) ,  AsString ( #fiel ) , AsString ( #decl )  , AsString ( #text )
regards
Karl-Heinz
Attachments
Commands.png
Commands.png (24.95 KiB) Viewed 348 times
User avatar
ArneOrtlinghaus
Posts: 384
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Do I see ghosts somewhere?

Post by ArneOrtlinghaus »

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
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Do I see ghosts somewhere?

Post by Karl-Heinz »

Hi Arne,

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
?
regards
Karl-Heinz
Post Reply