T,
First things first: while my complaint about MSDN information still stands,
I made a mistake when looking at the link you provided : I fully missed it
described a structure, not a function (as Kaz made clear). There is some
logic to only have it refer to its "parent", the function, just as the
function refers to its "parent", the DLL.
Post by Tsub GlobalMemoryStatusEx(MEMORYSTATUSEX) is native('Kernel32') returns
int32 { * };
You're asking where /they/ got their information from ? Thats impossible
to say ...
But, if you just want to know which DLL contains a certain function name,
than, apart from googeling for it, you could extract the function names from
all the Windows DLLs[1] and put them into lists for easy searching.
[1] which, alas, most of them do *not* contain any information about the
ammount and types of their arguments.
Post by T"A tutorial about creating and using classes in Raku"
Hmmm... I can read that line as "you already know what a class is, here we
describe how you use them in the Raku language".
As far as I can tell there is not much you can know about a class : its a
container for methods (functions) and properties (variables), and you can
create multiple instances from a single template[2]. The rest
(implementation) is language dependant.
[2] In that regard its properties work the same as a function with local
variables : each has and manages its own variables (properties). You can
call such a function multiple times withouth having them mix up their local
variables.
Post by TWhen they refuse to define any of their terms starting
with "what is a 'class'?". You are left to guest from
context
While you are right, think about it : how deep do they need to go ? At
some point they would end up telling you about the best places to delve
silica sand to create the wavers from from which the chips are created that
make your computer work. Also, what is commonly referred to as "electrical
current" does not actually exist. Electrons flow from the negative terminal
towards the postive one, not the other way around. :-)
But granted, I would have been nice of them to mention which knowledge they
expect you to already have (so you can go google for it beforehand).
Post by TI did find this in Perl 5, which ACTUALLY defines what
https://perldoc.perl.org/perlglossary#class
I disagree that that is a good description. They could as well have said
"see 'data type' "and be done with it.
Also, a class doesn't need to be "set of possible values, together with all
the operations that know how to deal with those values". Take for instance
a class which does a ROT16 operation. It doesn't need any kind of "possible
values" (there is nothing it needs to "remember"). Just provide it a string
as the argument, and the output is the result.
A class dealing with anything thats not actually stored inside of it but
acts as an intermediary (from accessing files al the way down to hardware)
does not (need to) have any "possible values" to act upon either.
Post by TSo a "class" is a declaration of a custom structure of
a collection of variables.
Nope. That would just be another structure. The difference is that a
class (normally) also has methods (functions) to work with those variables
(properties).
Also, a class can have *internal* (private) variables[3] that you can only
access by way of a method - which means that those internal variables are
not properties (that you can read from and/or write to).
[3] Though a language like Python does not offer such "private" variables :
all of them directly accessible, making them properties.
Post by TThe name "class" is pulled out of someone's ear and you just have to live
with the obscure meaning they have attached to it.
Just like any word ? :-)
My pet peeve ? "Obsolete". It has got two rather different (not even
partially overlapping) definitions.
Post by Tsay (-5..5).rand.truncate.abs**3
I hope you notice that you are implicitily using a build-in object there
(there is no class name present), the one dealing with values.
Also notice that that example mixes together function names with special
function symbols ("**") that you most likely won't be able to define for
your own class(es).
Post by TWhich means to picks out a random number between -5 and 5
Not quite. The "pick a random number" from a provided range is the *second*
step. Storing that range into a "variable" is the first. You might be
able to do different things with that range than just to grab a random value
from it.
Regards,
Rudy Wieser