Archive of UserLand's first discussion group, started October 5, 1998.

Re: When to use address data type in UserTalk?

Author:Heath Tanner
Posted:8/31/1999; 12:42:46 AM
Topic:When to use address data type in UserTalk?
Msg #:10291 (In response to 10282)
Prev/Next:10290 / 10292

The use of the address data type is not really well motivated. The example uses an address to index into a string. Why do that? Why not simply use the string value and index into that? I'm basically confused as to when and why you want to use address variables.

One common use for address variables:

By passing addresses between scripts (or storing addresses in locations which are accessible to scripts), it's possible to pass data between scripts without having to copy it. Instead, an address pointing to the data is used.

For example, if I write a macro which manipulates information about a particular page, that macro might call another script or verb which also deals with the same page. Instead of sending a copy of the page in question, I would typically want to send the other script the address of the page.

Addresses are used very frequently in the websisite framework. If you examine the HTML verbs, you'll find that many of them accept addresses as a parameter.




This page was archived on 6/13/2001; 4:52:17 PM.

© Copyright 1998-2001 UserLand Software, Inc.