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

This forum is meant for questions and discussions about the X# language and tools
Post Reply
Anonymous

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

Post 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 329 times
User avatar
Chris
Posts: 4926
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

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

Post 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!
Chris Pyrgas

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

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

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

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

Post 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
Post Reply