Computer Science Canada

What is this symbol

Author:  timmytheturtle [ Thu Nov 04, 2004 4:46 pm ]
Post subject:  What is this symbol

Does anyone now what this symbol is used for : ->

Author:  wtd [ Thu Nov 04, 2004 5:11 pm ]
Post subject:  Re: What is this symbol

timmytheturtle wrote:
Does anyone now what this symbol is used for : ->


In many programming languages it's the "indirect access" operator. You use it when you have a pointer to a record (or "struct") type and wish to access its members.

In turing it's often used with classes.

code:
class A
    export say

    procedure say
        put "hello"
    end say
end A

var c : pointer to A

new A, c

c -> say

Author:  timmytheturtle [ Thu Nov 04, 2004 6:28 pm ]
Post subject: 

thanx wtd

Author:  Andy [ Thu Nov 04, 2004 6:31 pm ]
Post subject: 

its also used in pseudocode


: