|
|
On Sun, 23 Sep 2001 20:09:11 +0200, "Rune"
<run### [at] mobilixnetdk> wrote:
> I currently have the problem that I am not quite aware if all the macros
> in the files arrays.inc
ok. let's start
POV3.5b4 on PII233 128 MB with NT4Sp6
o) first macro: Rand_Array_Item
it uses floor of rand but rand can return value 1
which causes error "array subscript out of range"
I advice to multiply rand with 0.9999999 or something
It not change probability very much
o) macro: Resize_Array
suggested content
#macro Resize_Array(Arr,NewSize)
#local NewArray=array[NewSize]
#local C=0;
#local Max=min(NewSize,dimension_size(Arr, 1))
#while (C<Max)
#local NewArray[C]=Arr[C] // not use ";" !!!
#local C=C+1;
#end
#declare Arr=NewArray
#end
o) macro: Reverse_Array
lines
#local Array[J] = Array[N-J]
#local Array[N-J] = Temp
should be replaced with
#local Array[J] = Array[N-J-1]
#local Array[N-J-1] = Temp
o) do you want me to write
#macro Insert_In_Array(Item, DestArray, Index)
#macro Insert_Array_In_Array(ItemArray, DestArray, Index)
#macro Append_To_Array(Item, DestArray, Index)
#macro Append_Array_To_Array(ItemArray, DestArray, Index)
?
o) macro: Sort_Compare
seems ok
o) macro: Sort_Swap_Data
there should be no ";" if it is treated as universal macro
but of couse it could be annoying number of warnings for float
than there should be some description in comments
o) with sort macros I must concern little more
ABX
Post a reply to this message
|
|