xsharp.eu • Why are "DWORD" and "UInt32" intermixed in Help doc??
Page 1 of 1

Why are "DWORD" and "UInt32" intermixed in Help doc??

Posted: Mon Jul 20, 2020 8:41 pm
by Anonymous
Why are "DWORD" and "UInt32" intermixed in Help doc??
2020-07-20 15_38_45-AtC Function.png
2020-07-20 15_38_45-AtC Function.png (129.75 KiB) Viewed 190 times

Why are "DWORD" and "UInt32" intermixed in Help doc??

Posted: Mon Jul 20, 2020 8:59 pm
by Chris
Hi Matt,

Both refer to the exact same thing, UInt32 is the "official" type name that the help tool and every other .Net app knows about, while DWORD is the "friendly" name we use in XBase languages.

Apparently there's a missing bit in the script that adjusts type names in the parameters section in the help contents, which I think will be easy to fix. Will log this, thanks for reporting!

Why are "DWORD" and "UInt32" intermixed in Help doc??

Posted: Wed Jul 22, 2020 9:52 am
by robert
Matt,
The DWORD on the X# syntax is the keyword that matches the System.UInt32 type.
If you select the C# syntax you will see that this is listed as "uint"
The links in the parameter descriptions link to the .Net documentation about the UInt32 type.
You will see the same for STRING - String, LONG - Int32, SHORT - Int16 etc.
We (I) have chosen to keep the "real" type name in that section, with the exception of the X# internal types (such as USUAL, FLOAT, ARRAY and SYMBOL) For these types we do not include __Usual or __Array in the parameters list, since we have also replaced the internal names in the documentation with the keywords.

Robert

Why are "DWORD" and "UInt32" intermixed in Help doc??

Posted: Mon Jul 27, 2020 12:31 pm
by ic2
Hello Matt,

Even without X# you will encounter issues because the designers of C# (uint) did not talk to the designers of Windows (dword) ; both designed by Microsoft, of course . Take for example storing & reading a DWORD value to/from the registry in C#. This is how I do that:

RegistryKey Key = Registry.CurrentUser.OpenSubKey("SoftwareIC2SomeProgram");
uint nMyValue = Convert.ToUInt32(Key.GetValue("SomeDWORDValue").ToString());

Dick