Hi All,

Can someone explain why one has to use alias variables in the simple snippet below to make it work? When I tried to use :

start_x = CentroidX (sTableName.obj)

start_y = CentroidY(sTableName.obj)

the program generates error messages.

Thanks

Jack

Here is the snippet:

Dim start_x, start_y As Float

Dim a as Alias

Dim b as Alias

Dim  nrows, crows as smallint

Dim szFullTableName, sTableName as String

szFullTableName = FileOpenDlg("","","TAB","Open Table with Point Objects")

Open Table szFullTableName

sTableName = PathToTableName$(szFullTableName)

crows=1

nrows = TableInfo(sTableName, TAB_INFO_NROWS)

Do While (crows <= nrows)

Fetch Rec crows From sTableName

a = sTableName + ".obj"

start_x = CentroidX (a)

start_y = CentroidY(a)

' this code works

Reply via email to