Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/8.0.0/doc/ssclib/node103.html
Дата изменения: Wed Jul 2 03:52:41 2008 Дата индексирования: Fri Sep 5 19:37:53 2008 Кодировка: Поисковые слова: saturn's moon |
This function takes as input two sequences of ranges and returns a sequence which contains all overlaps between the input ranges.
Points to note:
andedRanges => andRangesPair(andedRanges, rangesB)
The memory that the pointer andedRanges pointed to before the call now has no pointer to it, since at the moment the call is executed andedRanges is reassigned to the same memory that the function points to, which was newly assigned during the call. The initial memory pointed to by andedRanges therefore cannot now be deallocated. Better would be:
tempAndedRanges => andRangesPair(andedRanges, rangesB) deallocate(andedRanges) andedRanges => tempAndedRanges
Then later, when appropriate, deallocate(andedRanges) for the final time.
% function andRangesPair(rangesA, rangesB, doChecks) result(andedRanges) function andRangesPair(rangesA, rangesB) result(andedRanges) type(RangeT), intent(in) :: rangesA(:), rangesB(:) type(RangeT), pointer :: andedRanges(:) % logical(bool), intent(in), optional :: doChecks end function andRangesPairXMM-Newton SOC/SSC -- 2008-07-01