zhpxie
路人甲
路人甲
  • 注册日期2004-11-08
  • 发帖数2
  • QQ
  • 铜币113枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1321回复:3

请帮我诊断这段程序的错误在何处?

楼主#
更多 发布于:2004-11-11 09:53
<P>请大家帮小弟下段程序错误出在哪里?每次编译都通不过。本人采用的是MAPBASIC4.5,我只改动了Create_map子程序中的Create Arc语句。谢谢!!!</P>
<P>include "ICONS.DEF"
include "MAPBASIC.DEF"
include "MENU.DEF"</P>
<P>declare sub main
declare sub create_map
declare sub Find_co_adj_freq
declare sub listbox_handler
declare sub Find_NB_cell
declare sub LAC_disturbtion
declare sub BSC_disturbtion
declare sub Adjust_site_size
global mapobj as object
global radius AS float</P>
<P>Sub main
   Create Menu "RNP_Tools" As
      "Create_map" Calling create_map,
       Alter Menu Bar Add "RNP_Tools"</P>
<P>  Open Table "D:\mapinfo\Zz1_50000\dl.tab" Interactive
  Map from dl
  Register Table "D:\mapinfo\all_mapinfo_data_zz.xls"  TYPE XLS Titles Range "Sheet1!R2C1:R5000C103" Into "D:\mapinfo\site_map\mapinfo_data.tab"
  open table "D:\mapinfo\site_map\mapinfo_data.tab" interactive
  
  select * from mapinfo_data  
    where cell_id > 0
    into map_table
  </P>
<P>  browse * from map_table
  Commit Table map_table As "D:\mapinfo\site_map\all_mapinfo_data.tab" TYPE NATIVE Charset "WindowsSimpChinese"
 Close Table mapinfo_data
  Open Table "D:\mapinfo\site_map\all_mapinfo_data.TAB" Interactive
  Create map for all_mapinfo_data
  'Commit table as all_mapinfo_data
  Add Map Auto Layer all_mapinfo_data
  End Sub</P>
<P>''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub create_map
  dim i as integer
  dim i_quarter as string
  i = 1
  fetch first from all_mapinfo_data
  do while not eot(all_mapinfo_data)
   if all_mapinfo_data.site_type = "S" or all_mapinfo_data.site_type = "S'" then
      Create Arc into variable mapobj (all_mapinfo_data.cell_long3,all_mapinfo_data.cell_lati3) (all_mapinfo_data.cell_long4,all_mapinfo_data.cell_lati4) all_mapinfo_data.start_ang  all_mapinfo_data.end_ang pen(1,2,green)  
  else
     Create Ellipse into variable mapobj (all_mapinfo_data.cell_long3,all_mapinfo_data.cell_lati3) (all_mapinfo_data.cell_long4,all_mapinfo_data.cell_lati4) pen(1,2,green) brush(52,green,white)
   end if  
     update all_mapinfo_data             'update the obj line by line!!!!
        set obj = mapobj
        where rowid = i
     i = i + 1
     fetch next from all_mapinfo_data
  loop
  note "OK!"</P>
<P>End Sub</P>
喜欢0 评分0
lcs158
论坛版主
论坛版主
  • 注册日期2003-07-30
  • 发帖数319
  • QQ
  • 铜币19枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2004-11-15 13:46
这就奇怪了,我帮你去掉逗号后,编译通过了
[url=http://www.sohi.cn]北京搜海书店,做中国3S书籍最齐全,服务最好的品牌书店。看看我们的网站,现在有什么新书!!![/url]
举报 回复(0) 喜欢(0)     评分
zhpxie
路人甲
路人甲
  • 注册日期2004-11-08
  • 发帖数2
  • QQ
  • 铜币113枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2004-11-15 10:15
<P>谢谢斑竹的指点,但删去逗号后,编译还是通不过。不知还有哪里的错误。</P>
举报 回复(0) 喜欢(0)     评分
lcs158
论坛版主
论坛版主
  • 注册日期2003-07-30
  • 发帖数319
  • QQ
  • 铜币19枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2004-11-12 14:24
<P>Sub main
   Create Menu "RNP_Tools" As
      "Create_map" Calling create_map,
                                                          ^^^
       Alter Menu Bar Add "RNP_Tools"
就是这个逗号出了问题</P>
[url=http://www.sohi.cn]北京搜海书店,做中国3S书籍最齐全,服务最好的品牌书店。看看我们的网站,现在有什么新书!!![/url]
举报 回复(0) 喜欢(0)     评分
游客

返回顶部