Variant records..

From: Ganesh Ramasivan (ganesh.ramasivan_at_gdcanada.com)
Date: 02/15/04

  • Next message: Cecilia Chew: "Question from newbie"
    Date: 15 Feb 2004 14:51:30 -0800
    
    

    In the following example, how would i forbid the user of data type Foo
    from specifying the following:

    John : Foo(Vehicle => MAN, Power => AUTOMATIC);

    ie. is there a way to restrict the user from specifying certain types
    as variants?

    Thanks for your input.

    Ganesh

    Example:

    procedure Variant is

       type Vehicle_Type is (CAR, LEGS, BIKE, PLANE);
       type Vehicle_Power is (MANUAL, AUTOMATIC);

       type Foo(Vehicle : Vehicle_Type; Power: Vehicle_Power) is
        record
            case Vehicle is
                 when CAR =>
                null;
                 when LEGS =>
                null;
                 when BIKE =>
                null;
                 when PLANE =>
                null;
             when others =>
                null;
            end case;
        end record;

        Audi : Foo(Vehicle => CAR, Power => MANUAL);
    begin
     null;
    end Variant;


  • Next message: Cecilia Chew: "Question from newbie"

    Relevant Pages

    • Re: Aggregating Date Data into Weeks and Quarters
      ... DateSerialReturns a Variant for a specified year, month, and day. ... Returns a Variant containing a whole number representing the day of the week. ... WeekdayName) Returns a string indicating the specified day of the week. ... MonthReturns a Variant specifying a whole number between 1 and 12, inclusive, representing the month of the year ...
      (microsoft.public.access.queries)
    • Re: Calculations
      ... Check out the DateDiff function in the Visual Basic Help File ... Returns a Variant specifying the number of time intervals between two ... The DateDiff function syntax has these named arguments: ...
      (microsoft.public.word.newusers)
    • Re: Aggregating Date Data into Weeks and Quarters
      ... DateSerialReturns a Variant for a specified year, month, and day. ... Returns a Variant containing a whole number representing the day of the week. ... WeekdayName) Returns a string indicating the specified day of the week. ... MonthReturns a Variant specifying a whole number between 1 and 12, inclusive, representing the month of the year ...
      (microsoft.public.access.queries)
    • How to control remote computer management
      ... How can I prevent users from specifying another computer name in the computer management console snap-in and/or how do I restrict a computer from allowing only specific users to connect? ...
      (microsoft.public.windows.server.general)
    • Computer Management Security Question
      ... How can I prevent users from specifying another computer name in the computer management console snap-in and/or how do I restrict a computer from allowing on specific users to connect. ...
      (microsoft.public.windows.server.security)