Session material: Differences between VO and X#

This forum is meant for anything you would like to share with other visitors
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Session material: Differences between VO and X#

Post by wriedmann »

Hi,

I have now translated my powerpoint document from the Italian Meeting at Bolzano and put it here:

Differences_VO_XS.pdf

Hopefully this PDF document will help a bit for all programmers coming from VO.

If someones finds errors, please let me know!

Wolfgang

P.S. on the page https://riedmann.it/verschiedenes_xsharp.php there may be other useful documents and samples.
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Session material: Differences between VO and X#

Post by lumberjack »

Hi Wolfgang,
wriedmann wrote: If someones finds errors, please let me know!
Here are maybe some cosmetics, please bear with me, an Italian German English translated by an Afrikaans Englishman. Hopefully we can get an Englishman or English American or English <Country>man to do a final edit.
Final notice: Please all Greeks English stay out of this, no names no pack drill :lol: :
The ErrorBlock is not more available
The ErrorBlock is not available anymore
As runtime we specify the libraries/DLLs than come with :
As runtime we specify the libraries/DLLs that come with:
Every data type in an object, even basic data types like „string“, „int“, „logic“
Every data type is an object, even basic data types like "string“, "int“, "logic“
•String != array of char != array of byte
•Attention at the conversions!
•You cannot more easily use memo fields for binary content (compressed or crypted data, etc.)
String != array or char != array of byte
•Attention to the conversions!
•You can more easily use memo fields for binary content (compressed or encrypted data, etc.)
A string in X# è is delimited with the double apostroph: „, but in the VO dialect also the single apostroph can be used. The parentheses [] cannot be used anymore.
A string in X# is delimited with a double apostrophe: ", but in the VO dialect, a single apostrophe can be used. The parentheses [] cannot be used anymore.
A single character delimited with single apostroph is not a string, but a char!
A single character delimited with a single apostrophe is not a string, but a char!
Attention at the dialects: Vulcan does not permits the single apostroph as string delimiters
Attention to the dialects: Vulcan does not permit a single apostrophe as string delimiters
Escaped string: e“Hi guys,nwelcome to Bolzano, the capital of “Südtirol““
Interpolated string i“Hi {cNome}“
Escaped string: e“Hi guys,nwelcome to Bolzano, the capital of “Südtirol““
Interpolated string:
Hi guys,
welcome to Bolzano, the capital of “Südtirol"
The namespaces are helping to organize the own classes, and to avoid conflicts.
Namespaces are helping to organize our own classes, and to avoid conflicts.
The „Using“ statement declares the used namespace, but it is possible to not specify it, but then you need to specify the fully qualified class name.
Separator between class and namespace : the dot „.“
The "Using“ statement declares the used namespace, but it is optional, otherwise you need to specify the fully qualified class name.
Separator between class and namespace : a dot ".“
example because they mix namespaces in assemblies (more different namespaces in one assembly, and namespaces sparsed over multiple assemblies)
example because they mix namespaces in assemblies (different namespaces in one assembly, and namespaces spread over multiple assemblies)
In VO we use the colon to access the methods and assign/access of the classes, and the dot for the members of structures. In X# we need delimiters in more occasions:
•Method/Assign/Access/Property: colon
•Static method: dot
•Separatore di namespace: dot
•Structure: dot Attention: some uses have requested that colon and dot are treated the same, and in some places this should work! (C# uses only the dot, so the Roslyn compiler make no distinction)
In VO we use a colon to access methods and assign/access of classes, a dot for the members of structures. In X# we need delimiters on more occasions:
•Method/Assign/Access/Property: colon
•Static method: dot
•Separators of namespaces: dot
•Structure: dot Attention: some users have requested that colon and dot are treated the same, and in some places this should work! (C# uses only the dot, so the Roslyn compiler make no distinction)
Since the application runs not more under the VO runtime control, we have to adjust to the .NET Framework sight.
Attention: without errorhandling the application could be terminated without error
Since the application does not run under the VO runtime control anymore, we have to adjust to the .NET Framework way.
Attention: without error handling the application could terminate without an error!!!
There is no more the possibility toi set a global error handler. Error handling in .NET is local, no more global like in VO!
There is no possibility anymore to set a global error handler. Error handling in .NET is local, no more GLOBAL like in VO!
Please pay attention to „begin – end sequence“
Please pay attention to "begin – end" sequences
can be defined „as IName“
can be defined "as IName“
Convention: every interface definition name start with an uppercase „I“
Convention: every interface definition name start with an uppercase i "I“
Float in Clipper and VO, and therefore also in Vulcan and X# is a „floating point“ data type, with a floating comma and exponents.
A number „123456789“ internally could be „123456788.9999999999“ .
This can lead to rounding problems since
„123456789 == nVariabile“ could return false.
In the .NET Framework there is a datatype „decimal“ with high precision, where these sort of errors does not occurs anymore. Unique problem: it is slower.
Float in Clipper and VO, and therefore also in Vulcan and X# is a "floating point“ data type, with a floating decimal comma/dot and exponents.
A number "123456789“ internally could be "123456788.9999999999“ .
This can lead to rounding problems since
"123456789 == nVariabile“ could return false.
In the .NET Framework there is a datatype "decimal“ with high precision, where these sort of errors does not occur anymore. Unique problem: it is slower.
Very good notice: in the X# runtime the „decimal“is supported
Very good notice: in the X# runtime the "decimal“is supported
The performance of VO e X# is very different to compare.
The performance of VO vs. X# is very difficult to compare.
•Interal all arrays are typed
•Macros are slower in compilation, but faster in execution because is like written code
•Garbage collector enhanced, stable and fast, in AnyCPU all the memory can be used,
•Internal all arrays are typed
•Macros are slower in compilation, but faster in execution because it is similar to written code
•Garbage collector enhanced, stable and fast, in AnyCPU all memory can be used,
______________________
Johan Nel
Boshof, South Africa
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Session material: Differences between VO and X#

Post by wriedmann »

Hi Johan,

thank you very much for your work!

I will add these corrections as fast as possible and then upload the changed document.

It is very hard to translate! Sometimes it takes more time for me to translate an Italian document to German as rewrite it completely in German... An most of the time the German is very far from being perfect.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Session material: Differences between VO and X#

Post by lumberjack »

Hi Wolfgang,
wriedmann wrote: Hi Johan,
thank you very much for your work!
I will add these corrections as fast as possible and then upload the changed document.
It is very hard to translate! Sometimes it takes more time for me to translate an Italian document to German as rewrite it completely in German... An most of the time the German is very far from being perfect.
You welcome. Just be careful, I might not always be correct. I always tell the story:

Code: Select all

At school in the Free State province where I grew up, only 2 languages are spoken, Afrikaans and Afrikaans.

I had this horrible subject called English at school.  I could not understand why I would not pass my grades if I fail it.  Afrikaans I could understand, because it is the language we communicate in...

Needless to say I then went to the University of Stellenbosch in the Western Cape province (close to Cape Town) and with a shock I realized English is actually a language spoken by other people... :lol: 
Anyway have fun!

Regards,
______________________
Johan Nel
Boshof, South Africa
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Session material: Differences between VO and X#

Post by robert »

Wolfgang,

Great overview. Thanks for that. I might 'steal' some topics from that for the help file if you don't mind.

One correction, in addition to the comments from Johan:
Prefixes for numbers are actually Suffixes,
so:
10m = Decimal 10
10d = Double 10
10s = Single 10
10b = binary 2

One additional remark:
In the X# runtime you can also store a Decimal value in a USUAL. The usualtype will be DECIMAL (27).

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Session material: Differences between VO and X#

Post by wriedmann »

Hi Johan,

thank you very much! I have corrected the document and uploaded it again.

I hope I have corrected all my errors.

For such corrections sometimes we would need Phil as native English speaker.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Session material: Differences between VO and X#

Post by wriedmann »

Hi Robert,

of course you can take what you like.

And thank your for your suggestions - I have added them to the document.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Session material: Differences between VO and X#

Post by lumberjack »

Hi Wolfgang,
wriedmann wrote:Hi Johan,
thank you very much! I have corrected the document and uploaded it again.
You are welcome, was a pleasure.

For such corrections sometimes we would need Phil as native English speaker.
I have to second that. By the way where is Uncle Phil, he is very quiet... Started to worry I scared him away. Afraid I will bash his Entity Framework promotions... :lol: :lol: :lol: :lol:
Regard,
______________________
Johan Nel
Boshof, South Africa
User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Session material: Differences between VO and X#

Post by wriedmann »

Hi Johan,

in the summer even in Wales the weather is good, and so Phil passes his time not at his computer.

I think he will re-show up when the winter comes <g>.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Session material: Differences between VO and X#

Post by lumberjack »

Hi Wolfgang,
wriedmann wrote: in the summer even in Wales the weather is good, and so Phil passes his time not at his computer.
I think he will re-show up when the winter comes <g>.
So you mean he does not hibernate in winter, he X# in winter? :lol:
______________________
Johan Nel
Boshof, South Africa
Post Reply