// Function Name : f_parse_ds_obj_string
// Argument Name : dw_arg, Arg Type : datastore, Pass By : Reference
// obj_list[], Arg Type : String, Pass By : Reference
// obj_type, Arg Type : String, Pass By : Value
// band, Arg Type : String, Pass By : Value
// Return Type : Integer
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
String obj_string
String obj_holder
Integer obj_count
Integer start_pos=1
Integer tab_pos
Integer count
obj_string = dw_arg.Describe("datawindow.objects")
tab_pos = Pos(obj_string,"~t",start_pos)
Do While tab_pos > 0
obj_holder = Mid(obj_string,start_pos,(tab_pos - start_pos))
If (dw_arg.Describe(obj_holder+".type") = obj_type or obj_type = "*") And &
(dw_arg.Describe(obj_holder+".band") = band or band = "*") Then
count = count + 1
obj_list[count] = obj_holder
End If
start_pos = tab_pos + 1
tab_pos = Pos(obj_string,"~t",start_pos)
Loop
obj_holder = Mid(obj_string,start_pos,Len(obj_string))
If (dw_arg.Describe(obj_holder+".type") = obj_type or obj_type = "*") And &
(dw_arg.Describe(obj_holder+".band") = band or band = "*") Then
count = count + 1
obj_list[count] = obj_holder
End If
Return count
// Argument Name : dw_arg, Arg Type : datastore, Pass By : Reference
// obj_list[], Arg Type : String, Pass By : Reference
// obj_type, Arg Type : String, Pass By : Value
// band, Arg Type : String, Pass By : Value
// Return Type : Integer
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
String obj_string
String obj_holder
Integer obj_count
Integer start_pos=1
Integer tab_pos
Integer count
obj_string = dw_arg.Describe("datawindow.objects")
tab_pos = Pos(obj_string,"~t",start_pos)
Do While tab_pos > 0
obj_holder = Mid(obj_string,start_pos,(tab_pos - start_pos))
If (dw_arg.Describe(obj_holder+".type") = obj_type or obj_type = "*") And &
(dw_arg.Describe(obj_holder+".band") = band or band = "*") Then
count = count + 1
obj_list[count] = obj_holder
End If
start_pos = tab_pos + 1
tab_pos = Pos(obj_string,"~t",start_pos)
Loop
obj_holder = Mid(obj_string,start_pos,Len(obj_string))
If (dw_arg.Describe(obj_holder+".type") = obj_type or obj_type = "*") And &
(dw_arg.Describe(obj_holder+".band") = band or band = "*") Then
count = count + 1
obj_list[count] = obj_holder
End If
Return count
0 comments:
Post a Comment