[fpc-pascal]How to assign values to a record variable?

Göran Andersson guffa at guffa.com
Thu Aug 1 12:18:49 CEST 2002


I fI remember correctly, this worked in TP, at least:

a={x:1;y:0};

/GreenGhost
--- www.guffa.com ---

> >Hello, Every one
> 
> Hello.
> 
> >Could anybody tell me that how to assign all values to a record
> >typed variable? I mean that in C I can assign a struct variable
> >such as:
> 
> type
>    aaa = record
>      x, y : Integer
>    end;
> 
> var
>    a : aaa;
> 
> begin
>    with a do begin
>       x := 1; y := 0
>    end;
> end.
> 
> Neat, simple, elegent.  Unlike C.
> 
> Martyn Ranyard
> Free Software Advocate
> 
> jabber - joran at amessage.de
> icq    - 122500800
> irc    - Joran on oftc
> msn    - ranyardm at hotmail.com
> e      - ranyardm at lineone.net
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 
> 





More information about the fpc-pascal mailing list