• (cs) in reply to dubwai
    dubwai:

    Not sure if you are kidding here.  const isn't allowed in Java.  In Java we use typesafe enums that look like this:

    public class DayOfWeek
    {
        public static final DayOfWeek SUNDAY = new DayOfWeek();
        public static final DayOfWeek MONDAY = new DayOfWeek();
        public static final DayOfWeek TUESDAY = new DayOfWeek();
        public static final DayOfWeek WEDNESDAY = new DayOfWeek();
        public static final DayOfWeek THURSDAY = new DayOfWeek();
        public static final DayOfWeek FRIDAY = new DayOfWeek();
        public static final DayOfWeek SATURDAY = new DayOfWeek();

        private DayOfWeek(){}
    }


    I know they have their purpose but I've seen enums like this used to the point (~4000 fields) where they hit the limit for the amount of static data you can have per class. Around 40KB if I recall correctly.
  • (cs) in reply to deadbeef

    deadbeef:

    I know they have their purpose but I've seen enums like this used to the point (~4000 fields) where they hit the limit for the amount of static data you can have per class. Around 40KB if I recall correctly.

    4000 seems a little excessive.  I don't know if there's much value in defining that many typesafe enums.

  • (cs) in reply to dubwai
    dubwai:

    4000 seems a little excessive.  I don't know if there's much value in defining that many typesafe enums.

    Exactly. Eventually it was changed to read the values from a file I believe.
  • DJ (unregistered) in reply to deadbeef

    it's not even real code, someone just badly made this include file up..

     

     

    Dim  iN 

    causes an unexpected identifier error, because you can't declare a vb keyword (in)

    DJ

     

  • (cs) in reply to DJ

    I finally found the game that I programmed all in Intel assembly in college!

    http://www.geocities.com/apollo_uiuc/ece291/index.html

    I think it's slightly out of date.  Good luck trying to get it to compile! It used some libray/exe wrapper called ex291.

Leave a comment on “Option Expletive”

Log In or post as a guest

Replying to comment #:

« Return to Article