Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old August 13, 2011, 18:35   #1
APWhite
Adept
 
APWhite's Avatar
 
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
p_ptr->class vs. p_ptr->pclass

So what was the push to switch pclass to class? 'class' is a reserved word in some environments (like Visual Studio).

pclass was still a useful word. We understood it to be player-class. I think that switch may have caused more harm than good.
APWhite is offline   Reply With Quote
Old August 13, 2011, 18:58   #2
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by APWhite View Post
So what was the push to switch pclass to class? 'class' is a reserved word in some environments (like Visual Studio).

pclass was still a useful word. We understood it to be player-class. I think that switch may have caused more harm than good.
I didn't make the change, but absent other considerations i think player->class and p_ptr->class read better. That said, if it's breaking things then I'm not necessarily against changing it back.

Does this prevent you from building in VC++/VS? I think that BluBaron has been building recent staging in Angband in VS without hitting this problem.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old August 13, 2011, 22:51   #3
Blue Baron
Adept
 
Join Date: Apr 2011
Posts: 103
Blue Baron is on a distinguished road
Quote:
Originally Posted by d_m View Post
I didn't make the change, but absent other considerations i think player->class and p_ptr->class read better. That said, if it's breaking things then I'm not necessarily against changing it back.

Does this prevent you from building in VC++/VS? I think that BluBaron has been building recent staging in Angband in VS without hitting this problem.
I am building without any mention of this pointer. even though "class" is highlighted for me, I guess it is not treated as a keyword in C files.
Blue Baron is offline   Reply With Quote
Old August 13, 2011, 23:23   #4
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,941
Derakon is on a distinguished road
It may also be that since it isn't a bare word it doesn't confuse the parser.
Derakon is offline   Reply With Quote
Old August 13, 2011, 23:39   #5
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 791
fph is on a distinguished road
GTK uses "klass" instead of "class" to avoid conflicting with the C++ reserved word. This is funny to see, since "klass" sounds a lot like the typical KDE3 app name...
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old August 17, 2011, 17:32   #6
Azerath
Rookie
 
Join Date: Jun 2011
Posts: 21
Azerath is on a distinguished road
klass - may come from KDE Large Ass... ;-) - just kidding no want to start OS-War ;-)
Azerath is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
new class? Tibarius Vanilla 11 July 18, 2011 19:53
New class? Philip Development 9 June 19, 2011 00:22
Question about p_ptr Kyle Development 1 July 28, 2009 00:30
p_ptr->command_cmd PaulBlay Development 5 April 22, 2009 05:24
This Class. Right here. Larvitz Vanilla 1 January 24, 2009 19:43


All times are GMT +1. The time now is 18:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.