Board index » delphi » HELP user defined data types

HELP user defined data types

I am taking a home correspondence course on computer programming and I
do not understand my text book on user defined data structures or data
types. Could sombody please help me with some information and/or
examples in Pascal. Thank you

 

Re:HELP user defined data types


Let me give you a really small hint.

Say you want to create a type of numbers in range 1 to 10. The code would
be:
Type
    Num1_10 = 1..0;
Then, you can use this to create variables of this type:
Var
    a, b, c: Num1_10;

Quote
Trish Minor wrote:
> I am taking a home correspondence course on computer programming and I
> do not understand my text book on user defined data structures or data
> types. Could sombody please help me with some information and/or
> examples in Pascal. Thank you

Re:HELP user defined data types


Quote
> Let me give you a really small hint.
> Say you want to create a type of numbers in range 1 to 10. The code would
> be:
> Type Num1_10 = 1..0;

--->             1..10;
Quote
> Then, you can use this to create variables of this type:
> Var
>     a, b, c: Num1_10;

> > I am taking a home correspondence course on computer programming and I
> > do not understand my text book on user defined data structures or data
> > types. Could sombody please help me with some information and/or
> > examples in Pascal. Thank you

Re:HELP user defined data types


example

type
        Address=record
                identifier:type;
        end;

var
    MyAddress:Address
   (identifier)    :  (type)

thus a user defined type

Trish Minor <tmi...@olympus.net> wrote in article
<35735987.7238C...@olympus.net>...

Quote
> I am taking a home correspondence course on computer programming and I
> do not understand my text book on user defined data structures or data
> types. Could sombody please help me with some information and/or
> examples in Pascal. Thank you

Other Threads