• only posting is rules

    From Tony Master@1:129/305 to All on Wed Dec 3 01:15:45 2003
    sad when only thing being posted is the rules frmo the moderator.

    --- Renegade v11-26.3 DOS
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Scott Adams@1:112/91 to Tony Master on Wed Dec 3 16:09:14 2003
    Quoting Tony Master to All <=-

    sad when only thing being posted is the rules frmo the moderator.

    Well I guess no one needs lessons :)



    ... "You're a vicious man." "It's in the job description!"
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Tony Master@1:129/305 to Scott Adams on Sat Dec 6 01:02:05 2003
    |03Quoting message from |11Scott Adams |03to |11Tony Master
    |03on |1103 Dec 03 16:09:14|03.

    Quoting Tony Master to All <=-

    sad when only thing being posted is the rules frmo the moderator.

    Well I guess no one needs lessons :)

    some one should post tutors/

    --- Renegade v12-06.3 DOS - Alpha Build 001
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From mark lewis@1:3634/12 to Tony Master on Tue Dec 9 17:01:34 2003
    sad when only thing being posted is the rules frmo the
    moderator.

    i agree... what can you contribute?

    )\/(ark


    * Origin: (1:3634/12)
  • From mark lewis@1:3634/12 to Tony Master on Tue Dec 9 17:03:34 2003

    sad when only thing being posted is the
    rules frmo the moderator.

    Well I guess no one needs lessons :)

    some one should post tutors/

    that's not what the area is/was for... it is for writting pascal code and getting assistance when one has trouble getting things right... rule 1 in the posted rules seems to state that pretty cleanly...

    )\/(ark


    * Origin: (1:3634/12)
  • From Tony Master@1:129/305 to Mark Lewis on Wed Dec 10 23:54:27 2003
    |03Quoting message from |11Mark Lewis |03to |11Tony Master
    |03on |1109 Dec 03 17:01:34|03.

    sad when only thing being posted is the rules frmo the
    moderator.

    i agree... what can you contribute?

    i don't teach. i learn =]

    --- Renegade v12-08.3 Alpha
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Scott Adams@1:112/91 to Tony Master on Fri Dec 12 06:59:07 2003
    Quoting Tony Master to Scott Adams <=-



    sad when only thing being posted is the rules frmo the moderator.

    Well I guess no one needs lessons :)

    some one should post tutors/

    Its better to ask questions and get folks to stay in
    the first place. Posting various tutorials don't
    do much but to give posts for the echo. Plus
    theres many good tutorials out there.

    I did a bunch of lessons on IRC once and then later
    again on my bbs and echomail network (AdventureNet). After
    that I found lots of various tutorials out there.




    ... AD&D Famous Last Words: "Dragon HORDE? I thought y'said Dragon HOARD!"
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Scott Adams@1:112/91 to mark lewis on Fri Dec 12 07:01:18 2003
    Quoting mark lewis to Tony Master <=-

    sad when only thing being posted is the
    rules frmo the moderator.

    Well I guess no one needs lessons :)

    some one should post tutors/

    that's not what the area is/was for... it is for writting pascal code
    and getting assistance when one has trouble getting things right...
    rule 1 in the posted rules seems to state that pretty cleanly...

    Yeah in the early '90s this echo was hopping. Then we
    got in the mid '90s all the kids needing help with
    their school work. Ugh. When I stopped a bit helping
    since doing homework/code for someone is not learning
    for them. So I changed my helping style to hints
    and other methods to learn rather than doing just code.


    ... "Please relax, its not a bribe." - Londo
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Scott Adams@1:112/91 to Tony Master on Fri Dec 12 07:01:43 2003
    Quoting Tony Master to Mark Lewis <=-


    sad when only thing being posted is the rules frmo the
    moderator.

    i agree... what can you contribute?

    i don't teach. i learn =]

    So what do ya want to learn?



    ... "He has no family back home, no on to miss him or fight for his name."
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Tony Master@1:129/305 to Scott Adams on Fri Dec 19 12:00:21 2003
    |03Quoting message from |11Scott Adams |03to |11Tony Master
    |03on |1112 Dec 03 07:01:43|03.

    Quoting Tony Master to Mark Lewis <=-


    sad when only thing being posted is the rules frmo the
    moderator.

    i agree... what can you contribute?

    i don't teach. i learn =]

    So what do ya want to learn?

    the best way to learn pointers for now

    --- Renegade v12-15.3 - Alpha
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From mark lewis@1:3634/12 to Tony Master on Fri Dec 19 14:50:16 2003
    i don't teach. i learn =]

    So what do ya want to learn?

    the best way to learn pointers for now

    you want to learn the best way to learn pointers or you want to learn pointers by the best way? ;-)

    j/k...

    i'll see what i can possibly come up with... i'm sure that scott also has something available... maybe he'll post it? my stuff i'll have to input on the fly as we go...

    )\/(ark


    * Origin: (1:3634/12)
  • From Tony Master@1:129/305 to Mark Lewis on Sun Dec 21 07:12:40 2003
    you want to learn the best way to learn pointers or you want to learn point by the best way? ;-)

    j/k...

    i'll see what i can possibly come up with... i'm sure that scott also has something available... maybe he'll post it? my stuff i'll have to input on fly as we go...

    heheh ok cool. pointers for dummies. =]

    --- Renegade v12-15.3 - Alpha
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Scott Adams@1:112/91 to Tony Master on Mon Jan 12 00:16:42 2004
    Quoting Tony Master to Scott Adams <=-


    sad when only thing being posted is the rules frmo the moderator.

    i agree... what can you contribute?

    i don't teach. i learn =]

    So what do ya want to learn?

    the best way to learn pointers for now

    What level of knowledge do you know about them now? I
    ask so not to go WAY basic on you :)

    I might pull one of my ancient pascal lesson tutorials out
    and get the pointer one I did up for ya.

    Let me know..



    ... Babylon 5: A science fiction show that KNOWS where it's going!
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Scott Adams@1:112/91 to Tony Master on Mon Jan 12 00:28:09 2004
    `07*** Quoting Scott Adams from a message to Tony Master ***`07

    Quoting Tony Master to Scott Adams <=-


    sad when only thing being posted is the rules frmo the moderator.

    i agree... what can you contribute?

    i don't teach. i learn =]

    So what do ya want to learn?

    the best way to learn pointers for now

    What level of knowledge do you know about them now? I

    Pulled out my old ancient (like 1995!) lessons on pascal. Keep in mind these were in a set of such lessons. I thought the one on pascal was more details but I find its just technical stuff from the language itself. I must've lost the other file with it. But maybe you'll get something out of it? :) Like I say though its 8 years old.


    █▓▒░ Pascal Lessons ░▒▓█

    o Advanced Topics
    ■ Lesson 21: Pointers
    Pointers are probably th emost difficult to learn in any language.
    Pointers in basic terms are just constructs that point to something
    in a computer's memory. Think of a map. A street sign is a pointer
    which points to a street while addresses point to a particular
    slot within that street. Its the same analogy. I will try to
    explain the technical part of it but keep in mind something as
    short as this lesson can't cover it all. If you need further
    aid just ask and I can supply further discussion.
    Pointers are used because memory is a tight resource. IF you
    have a list of thousands of strings for example its futile and
    imposible to keep it flowing as memory will run out. Thus you
    should use pointers to point to items in that list. This then
    only uses ONE record (of that byte size) instead of the thousnads
    of records and their byte size total.
    Now for the technicals:

    The @ ("at") operator: Pointer operation
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    You can create a pointer to a variable with the @ operator.

    Operator│Operation │Operand types │Result type
    ═════════╪═════════════════╪══════════════════════╪══════════════════════
    @ │Pointer formation│Variable reference, │Pointer (same as nil)
    │ │procedure identifier, │
    │ │or function identifier│

    @ is a unary operator. Special rules apply to use of the @ operator with
    a procedural variable.

    The type of the value is the same as the type of nil, so it can be
    assigned to any pointer variable.

    @ with a variable:
    Using @ with an ordinary variable (not a parameter) is not complicated.
    For example, given these declarations:

    type
    TwoChar = array[0..1] of Char;
    var
    Int: Integer;
    TwoCharPtr: ^TwoChar;

    this statement causes TwoCharPtr to point to Int:
    TwoCharPtr := @Int;

    TwoCharPtr^ becomes a reinterpretation of the value of Int, as if it were
    an array[0..1] of Char.

    @ with a value parameter:
    Applying @ to a formal value parameter results in a pointer to the stack location containing the actual value.

    For example, suppose Fred is a formal value parameter in a procedure and FredPtr is a pointer variable.

    If the procedure executes this statement
    FredPtr := @Fred;

    FredPtr^ references Fred's value.

    However, FredPtr^ does not reference Fred itselfit references the value that was taken from Fred and stored on the stack.

    @ with a variable parameter:
    Applying @ to a formal variable parameter results in a pointer to the actual
    parameter (the pointer is taken from the stack).

    The type of resulting pointer value is controlled through the $T compiler directive.

    For example, suppose the following:
    - One is a formal variable parameter of a procedure,
    - Two is a variable passed to the procedure as One's actual parameter
    - OnePtr is a pointer variable.

    If the procedure executes this statement
    OnePtr := @One;

    OnePtr is a pointer to Two, and OnePtr^ is a reference to Two itself.

    @ with a procedure or function:
    You can apply @ to a procedure or a function to produce a pointer to its
    entry point. Turbo Pascal does not give you a mechanism for using such a pointer.

    The only use for a procedure pointer is to pass it to an assembly language routine or to use it in an inline statement.

    @ with a method:
    You can apply @ to a qualified method identifier to produce a pointer to the method's entry point.

    Pointer-type constants
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    The declaration of a pointer-type constant typically uses a
    constant address expression to specify the pointer value.

    When you enable the extended syntax (with a {$X+} compiler directive), a
    typed constant of type PChar can be initialized with a string constant.

    Examples:
    type
    Direction = (Left, Right, Up, Down);
    StringPtr = ^String;
    NodePtr = ^Node;
    Node = record
    Next: NodePtr;
    Symbol: StringPtr;
    Value: Direction;
    end;
    const
    S1: string[4] = 'DOWN';
    S2: string[2] = 'UP';
    S3: string[5] = 'RIGHT';
    S4: string[4] = 'LEFT';
    N1: Node = (Next: nil; Symbol: @S1; Value: Down);
    N2: Node = (Next: @N1; Symbol: @S2; Value: Up);
    N3: Node = (Next: @N2; Symbol: @S3; Value: Right);
    N4: Node = (Next: @N3; Symbol: @S4; Value: Left);
    DirectionTable: NodePtr = @N4;

    Pointer types
    ▀▀▀▀▀▀▀▀▀▀▀▀▀▀

    A pointer type variable contains the memory address of a dynamic variable of
    a specified base type.

    You can assign a value to a pointer variable with:
    - the New or GetMem procedures
    - the @ operator
    - the Ptr function

    The reserved word nil denotes a pointer constant that does not point to anything.

    Pointer:
    The predefined type Pointer denotes an untyped pointer (a pointer that does
    not point to any specific type).

    PChar:
    The predefined type PChar denotes a pointer to a null-terminated string.

    PChar is declared as:
    type PChar = ^Char;

    Borland Pascal for Windows supports a set of extended syntax rules
    (controlled by the $X compiler directive) to facilitate handling of strings using the PChar type.

    Example:
    { Pointer Type Declaration }
    type
    BytePtr = ^Byte;
    WordPtr = ^Word;
    IdentPtr = ^IdentRec;
    IdentRec = record
    Ident: string[15];
    RefCount: Word;
    Next: IdentPtr;
    end;

    Don't be worried if you don't understand the above at first.
    It will need to sink in with various examples. I can furish
    them if needed.



    ----

    Looking it over its not that useful :)


    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Tony Master@1:129/305 to Scott Adams on Tue Jan 13 00:25:42 2004
    |03Quoting message from |11Scott Adams |03to |11Tony Master
    What level of knowledge do you know about them now? I
    ask so not to go WAY basic on you :)

    i know they point to a spot in memory

    --- Renegade v01-10.4 DOS
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Chris Hoppman@1:129/305 to Tony Master on Tue Jan 13 09:56:40 2004
    Quoting message from Scott Adams to Tony Master
    What level of knowledge do you know about them now? I
    ask so not to go WAY basic on you :)

    i know they point to a spot in memory

    You and me both. That is about all I know about them.

    chris

    --- Renegade v01-10.4 DOS
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Chris Hoppman@1:129/305 to Scott Adams on Tue Jan 13 10:02:10 2004
    Quoting Tony Master to Scott Adams <=-
    What level of knowledge do you know about them now? I
    ask so not to go WAY basic on you :)

    Well, I have program'd with them in the past and sort of done them right,
    but the concept is slightly over my head when it comes to them. Since we have talked last I have went to my libary store and picked up an old novice pascal book that had a few examples and goes over them breifly.

    I might pull one of my ancient pascal lesson tutorials out
    and get the pointer one I did up for ya.

    Let me know..

    I see that you postted one. Which is really nice of you. I went ahead and downloaded the message from this bbs and I will go over it and see if I can get a better understanding.

    I didn't know about the @ part.

    chris

    --- Renegade v01-10.4 DOS
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Jasen Betts@3:640/1042 to Tony Master on Wed Jan 14 19:02:56 2004
    Hi Tony.

    13-Jan-04 00:25:42, Tony Master wrote to Scott Adams


    |03Quoting message from |11Scott Adams |03to |11Tony Master
    What level of knowledge do you know about them now? I ask so not
    to go WAY basic on you :)

    i know they point to a spot in memory

    The trick is getting them to point to a convenient spot.

    there's a number of ways to do that


    NIL is a special pointer constant that is used wehn you want a pointer to
    point nowhere

    @ can be used to point one at an existing variable

    new can be used to create an anonymous variable and point a pointer at it

    dispose is the opposite of new and deestroys an anonymous variable if you
    have a pointer to it



    Where it gets interesting is when you make a record that contains a
    pointer to a record of the same type.... then you can create a chain of records, of any length and add or remove records at either end or in the
    middle of the chain, this is called a linked list.

    if you add more pointers to the record you can have a branching chain etc...

    Bye <=-

    ---
    * Origin: Don't pay your exorcist & get repossessed! (3:640/1042)
  • From Tony Master@1:129/305 to Jasen Betts on Thu Jan 15 03:37:18 2004
    i know they point to a spot in memory

    The trick is getting them to point to a convenient spot.

    there's a number of ways to do that


    NIL is a special pointer constant that is used wehn you want a pointer to
    point nowhere

    @ can be used to point one at an existing variable

    new can be used to create an anonymous variable and point a pointer at it

    what about seeing the ^blah?

    --- Renegade v01-10.4 DOS
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Jasen Betts@3:640/1042 to Tony Master on Fri Jan 16 20:27:39 2004
    Hi Tony.

    15-Jan-04 03:37:18, Tony Master wrote to Jasen Betts

    new can be used to create an anonymous variable and point a
    pointer at it

    what about seeing the ^blah?

    ^blah is the type-name of pointer that points to a blah

    blah is usually some sort of record, but you can have simple types too.

    Bye <=-

    ---
    * Origin: Bad karma, yea Way bad karma.. (3:640/1042)
  • From Scott Adams@1:112/91 to Tony Master on Fri Jan 23 07:43:48 2004
    Quoting Tony Master to Scott Adams <=-

    Quoting message from Scott Adams to Tony Master
    What level of knowledge do you know about them now? I
    ask so not to go WAY basic on you :)

    i know they point to a spot in memory

    That's a start :)

    Did I post my stupid ancient lesson? :)

    I honestly thought I had more detail in it but apparently
    didn't. I ought to see if I have my IRC logs when
    I taught some stuff on the IRC sysopnet. Might
    have something there on pointers.

    The basic thing to remember is that pointers can save tons
    of memory and free up that annoying 64k data limit. You
    can set up a array with a pointer and free up data space.

    That is their main purpose in the old world. In modern
    world they tend to be more for efficiency since most
    compilers use windows and such.



    ... I no longer have a need to learn. It's part of being an SOB.
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Scott Adams@1:112/91 to Chris Hoppman on Fri Jan 23 07:51:45 2004
    Quoting Chris Hoppman to Scott Adams <=-


    Quoting Tony Master to Scott Adams <=-
    What level of knowledge do you know about them now? I
    ask so not to go WAY basic on you :)

    Well, I have program'd with them in the past and sort of done them
    right, but the concept is slightly over my head when it comes to them. Since we have talked last I have went to my libary store and picked up
    an old novice pascal book that had a few examples and goes over them breifly.

    Take a look at the SWAG archives it has a whole section on pointers.
    I have a link on my website http://users.cybermax.net/~longshot
    on the programming page.

    The main rule of thumb is
    1) Always open and close pointers. This being critical.
    Use the New function to assign memory for the pointer
    variable. Using Dispose Function to free up that memory.
    In fact if you don't associate 1 New for 1 Dispose it
    will cause memory leaks. It can cause problems. If your
    program crashes its good to have a ExitProc type procedure
    that runs when the program crashes or fails. This will free
    up any pointers that aren't disposed. Swag has examples of
    all this.
    2) Only use pointers if your going to transverse large data sets.
    A simple numeric variable of I, J : Integer doesn't need one.
    But an array[700,800] of String[70] might find use for them.

    Pointers were origianlly invented more or less for use in
    B-Trees (Binary trees), Search trees, linked lists using parent
    and child nodes (data). Again this is covered in SWAG with
    examples.

    I might pull one of my ancient pascal lesson tutorials out
    and get the pointer one I did up for ya.

    Let me know..

    I see that you postted one. Which is really nice of you. I went
    ahead and downloaded the message from this bbs and I will go over it
    and see if I can get a better understanding.

    I didn't know about the @ part.

    Its about a decade old I think :)...real ancient and not useful
    when I look at it today. Back then though it was...
    I hardly use the @ part myself. Pascal pointers are far easier
    to deal with than C pointers. If you two have problems with
    specific questions ask away.

    Its 2am so can't give much more brain energy into the posts but
    will help you out when I can..



    ... One more word and you will be part of the excess population - G'kar
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Scott Adams@1:112/91 to Jasen Betts on Fri Jan 23 07:54:17 2004
    Quoting Jasen Betts to Tony Master <=-

    @MSGID: 3:640/1042 314aecfc
    Hi Tony.

    13-Jan-04 00:25:42, Tony Master wrote to Scott Adams


    Quoting message from Scott Adams to Tony Master
    What level of knowledge do you know about them now? I ask so not
    to go WAY basic on you :)

    i know they point to a spot in memory

    The trick is getting them to point to a convenient spot.

    there's a number of ways to do that


    NIL is a special pointer constant that is used wehn you want a
    pointer to point nowhere

    @ can be used to point one at an existing variable

    new can be used to create an anonymous variable and point a pointer
    at it
    dispose is the opposite of new and deestroys an anonymous variable if
    you have a pointer to it



    Where it gets interesting is when you make a record that contains a pointer to a record of the same type.... then you can create a chain
    of records, of any length and add or remove records at either end or in the middle of the chain, this is called a linked list.

    if you add more pointers to the record you can have a branching chain etc...

    Yep. All precursors to the search engines used in most
    efficient search systems. B-Trees and all that. Sorts.

    Luckilly not had to do a Linked list thing since college :)
    Simple today but back then it was like magic :)


    ... "Besides, I don't think we have the room." - Sheridan
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)