Re: Record

From: Bruce Roberts (ber_at_bounceitattcanada.xnet)
Date: 10/28/04


Date: Thu, 28 Oct 2004 12:37:07 -0400


"Profetas" <xuxu_18@yahoo.com> wrote in message
news:bfdf05c346d339ced65cc7cf8197dc02@localhost.talkaboutprogramming.com...
> Hi,
>
> How do I access the head and last from this structure?
>
> type
> LineElem = ^LineElemDesc;
> LineList = record head, last: LineElem
> END;
>
>
> LineElemDesc = record
> Line: INTEGER;
> next: LineElem;
> END;
>
> var
> list : LineElem;
>
> suppose I wante to create a list

    var list : LineList;

> new(list);

> list^.next :=NIL;
> list^.line := line;
>
> I forgot how I access the head and last?

    list.Head := nil;
    list.Last := nil;

To add a record

   var elem : LineElem;

    new (elem);
    if list.Last <> nil
    then list.Last.Next := elem
    else list.Head := elem;
    list.Last := elem;
    list.Last.Next := nil;



Relevant Pages

  • Re: Help with two page form
    ... <HTML> ... <HEAD> ... function load1() { ... var load1 = window.open('http://www.webdesignsbyjc.com/DBSample/ ...
    (comp.lang.php)
  • Help with two page form
    ... <HTML> ... <HEAD> ... function load1() { ... var load1 = window.open('http://www.webdesignsbyjc.com/DBSample/ ...
    (comp.lang.php)
  • Re: Picture Slideshow
    ... I have tried a lot of different javascript code snippets in Publisher ... Head section, I would move on to find one that doesn't require it, because ... var preloadedimages=new Array ...
    (microsoft.public.publisher.webdesign)
  • Re: Save exact contents of web form (including special characters) to file?
    ... thanks for the replies although a lot of it was over my head. ... have been learning web scripting for 3 or 4 days now so be please dumb ... Javascript String does not contain all of the "special characters" you ... var xmlHttp = new XMLHttpRequest; ...
    (comp.lang.javascript)
  • Re: Picture Slideshow
    ... I have tried a lot of different javascript code snippets in Publisher ... Head section, I would move on to find one that doesn't require it, ... If you google for 'javascript slideshow ... var preloadedimages=new Array ...
    (microsoft.public.publisher.webdesign)