Bir Tablonun Açık Olup Olmadığını Nasıl Anlarız?

Aşağıdaki MapBasic programı adı verilen bir tablonun o an MapInfo’da açık olup olmadığına bakar:

declare sub main
declare function IsTableOpen(ByVal TableName as string) as logical

sub main
  if IsTableOpen("Mahalle") then
    Note "Tablo açık"
  else
    Note "Tablo açık değil"
  end if
end sub

function IsTableOpen(ByVal TableName as string) as logical
  dim i as integer
  IsTableOpen = 0
  for i = 1 to NumTables()
    if TableInfo(i, 1) = TableName then
      IsTableOpen = 1
      exit for
    end if
  next
end function
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment