Maybe stupid question but I did not find out way how to return more then one parameter from Sub. I would like to do something like this:
Sub MinMax (array(), array_max_index, min_index, max_index, min_value,
max_value)
min_value=array(0)
max_value=array(0)
min_index=0
max_index=0
For i=0 To array_max_index
If array(i)<min_value Then
min_value=array(i)
min_index=i
Else If array(i)>max_value Then
max_value=array(i)
max_index=i
End If
Next
End Sub
When I run this kind of code values for min,max values and indexes are not returned. In C language the values I want to return should be called by addresses with & symbol. Is there any way how to do it in Basic4PPC?
thnx
Sub MinMax (array(), array_max_index, min_index, max_index, min_value,
max_value)
min_value=array(0)
max_value=array(0)
min_index=0
max_index=0
For i=0 To array_max_index
If array(i)<min_value Then
min_value=array(i)
min_index=i
Else If array(i)>max_value Then
max_value=array(i)
max_index=i
End If
Next
End Sub
When I run this kind of code values for min,max values and indexes are not returned. In C language the values I want to return should be called by addresses with & symbol. Is there any way how to do it in Basic4PPC?
thnx