file f; non standard capitalization

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

User avatar
rrTea
Posts: 283
Joined: Sat Feb 15, 2014 9:54 am

file f; non standard capitalization

Postby rrTea » Wed Jul 12, 2017 10:51 am

In ZExpression, everything is defined using
model m; //Model m; error
string s; //String s; error
int i; //Int i; error

but
file f;
doesn't work unless it's capitalized like File f; (also it doesn't turn bold / blue like the rest).

User avatar
Kjell
Posts: 1608
Joined: Sat Feb 23, 2008 11:15 pm

Re: file f; non standard capitalization

Postby Kjell » Wed Jul 12, 2017 11:37 am

Hi rrTea,

That's because int / float / string and even model ( a pointer to a Model instance ) are built-in data types, while Bitmap / File / Sound are component types.

K

User avatar
VilleK
Site Admin
Posts: 1877
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: file f; non standard capitalization

Postby VilleK » Wed Jul 12, 2017 11:54 am

It is a bit inconsistent, I agree, but indeed it is like Kjell explains. I wanted to make the built in primitive datatypes similar to C-standard ("int" etc) but the component types with initial caps to give them a sense of being a "class type".

User avatar
rrTea
Posts: 283
Joined: Sat Feb 15, 2014 9:54 am

Re: file f; non standard capitalization

Postby rrTea » Wed Jul 12, 2017 12:07 pm

I can see the logic - a bit surprising the first time one bumps into it (at least to me - I'd find it easier to remember if it were all the same, especially since the int & co are used all the time) but not a problem really, I'll keep it in mind. Sorry for the false alarm!


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest