1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
sub Main ()
heuresAvions()
end sub
type hours
pic as integer
cpi as integer
dua as integer
end type
type airplane
airplane as string
day as hours
night as hours
end type
sub airplanesInit (planes() as airplane)
dim i as integer
planes(0).airplane = "C150"
planes(1).airplane = "C172"
planes(2).airplane = "PA28"
planes(3).airplane = "AC11"
planes(4).airplane = "C206"
planes(5).airplane = "DA20"
planes(6).airplane = "DA40"
planes(7).airplane = "PA23"
planes(8).airplane = "PA34"
planes(9).airplane = "Bae146"
planes(10).airplane = "DA42"
for i = 0 to UBound(planes)
planes(i).day.pic = 0
planes(i).day.cpi = 0
planes(i).day.dua = 0
next i
end sub
sub heuresAvions
'_________________________ Variables _____________________________________
dim document as object, doc2 as object
document = ThisComponent
dim searchDesc as object
dim RetStr as String
dim oSheet as object, oCell as object, found as object
dim urlLogbook2 as string, i1 as string, i2 as string
dim dummy()
'______________________ Initializing variables___________________________
oSheet = document.Sheets.getByIndex(0)
oCell = oSheet.getCellByPosition(0, 20)
searchDesc = oCell.createSearchDescriptor()
searchDesc.searchString = ".*20$"
searchDesc.searchRegularExpression = true
'______________________ Processing data _________________________________
Dim airplanes(10) as airplane
airplanesInit(airplanes())
end sub |
Partager