Re: [phix] if 'number' then why not 'list' ?

new topic     » goto parent     » topic index » view thread      » older message » newer message
katsmeow said...

Still not what i said.

Still no idea what the question is.

katsmeow said...

Is a class like a include file, with everything in the include file scoped to what you declared as a class?

What part of "Everything in a class is scoped to an instance of that class." does not answer that question?

katsmeow said...

Now both cows have variables and procedures and functions

They most certainly do not (as irv just posted while I was typing). There is one cow that can be referenced via two namespaces.

An include statement includes a file.
A class statement defines a class.
There are some minor similarities and many more vast differences.
A new class instance can be created using new(). An include instance just is.
An include can contain global and non-global definitions, which are and are not visible.
A class can have public and private fields, but they don't exist except via an instance, and only then does externally visible or internal only apply.
"Yes they are similar" and "No they are completely different" are both true at the same time.
If you had bothered to read even the first line of the manual you would know that classes are much closer to types than include statements.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu