*区域的周长是它的外围尺寸,岛屿及空洞对它的周长不影响
dev_set_draw('margin')
gen_rectangle1(Rectangle1,100,100,250,250)
contlength(Rectangle1,ContLength1)
gen_rectangle1(Rectangle2,50,50,350,350)
contlength(Rectangle2,ContLength2)
*两个区域相减
difference(Rectangle2,Rectangle1,RegionDifference)
dev_clear_window()
dev_display(RegionDifference)
*孔洞对区域周长不影响
contlength(RegionDifference,ContLength3)