|
阅读:1321回复:3
请帮我诊断这段程序的错误在何处?
<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> |
|
|
1楼#
发布于: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> |
|
|
|
2楼#
发布于:2004-11-15 10:15
<P>谢谢斑竹的指点,但删去逗号后,编译还是通不过。不知还有哪里的错误。</P>
|
|
|
3楼#
发布于:2004-11-15 13:46
这就奇怪了,我帮你去掉逗号后,编译通过了
|
|
|