From 7bdbfb766363472a62a05c54de5e983f12c130bd Mon Sep 17 00:00:00 2001 From: Rafael Date: Thu, 18 Jun 2015 23:36:06 +0200 Subject: Update tut2.txt --- doc/tut2.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/tut2.txt b/doc/tut2.txt index e1ac20074..966423844 100644 --- a/doc/tut2.txt +++ b/doc/tut2.txt @@ -233,17 +233,15 @@ is needed: type Socket* = ref object of RootObj - FHost: int # cannot be accessed from the outside of the module - # the `F` prefix is a convention to avoid clashes since - # the accessors are named `host` + host: int # cannot be accessed from the outside of the module due to missing star proc `host=`*(s: var Socket, value: int) {.inline.} = - ## setter of hostAddr - s.FHost = value + ## setter of host address + s.host = value proc host*(s: Socket): int {.inline.} = - ## getter of hostAddr - s.FHost + ## getter of host address + s.host var s: Socket new s -- cgit 1.4.1-2-gfad0