[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
enum types, probe maps
From: |
Paul Johnson |
Subject: |
enum types, probe maps |
Date: |
Wed, 05 Apr 2000 16:30:52 -0500 |
I just got carried away rewriting an app and getting rid of a bunch of
preprocessor flags that were making it hard to edit. Now I want to just
use a enumerated variable to distinguish the two model specificiations.
I got this idea from HeatSpace.h and the typedef it uses for
ExtremeHeatType. SO I declared this:
typedef enum {axelrod, hj} ModelType;
Then I declared a variable
ModelType model;
And then used branching like
if (model == hj) { blah blah}
else if (model ==axelrod} {blah blah}
else { warning message to user}
Quickly after writing it this way, I realized I was screwed because var
probes don't like this. THe probe for "model" does not let you type in
"axelrod," as far as I can tell, and further, I realized I don't know
what to do with command line parameter processing to turn the string
"axelrod" into the right format so I can set model equal to it.
Have I correctly understood the nature of my mistake?
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- enum types, probe maps,
Paul Johnson <=