Question: Hopefully a straight forward answer, but how can I determine if a variable has more then one observation that equals the maximum? For example, if the following is my data:

```
ID      Doctor  COUNT   
576434  Tim     1   
576434  Lynn    1   
576434  Moran   1   
576434  Wade    2   
576434  Ashwin  2   

```

Looking at the variable "COUNT", we can see that two observations equal the maximum value 2. I would then want to flag this "ID" as having a tie. The data is already in order by ID then COUNT, so my thought was maybe to just see if the values in the last two rows equal, but hoping for a better way. Thanks!

Answer: 
I'd go with C library (e.g. [How to play MP3 files in C?](https://stackoverflow.com/questions/428884/how-to-play-mp3-files-in-c)).

I'd create shared lib with your routine (e.g. code playing some sort of mp3 list) and called it from Fortran code.

Question is, whether this is what you are looking for.
It may be interesting to try the `system` call together with a command-line tool, e.g.

```
program main
    implicit none
    integer i
    character(100) :: message(3)

    message(1) = "hi"
    message(2) = "yo"
    message(3) = "done!"

    do i = 1, 3
        call system( "say " // trim( message(i) ) )
    enddo
end

```

which [say](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/say.1.html)s any message via speech synthesis on Mac OSX. A similar thing may be achieved for MP3 files with some audio commands (on [Windows](https://stackoverflow.com/questions/1569765/how-to-play-audio-file-on-windows-from-command-line), [Mac](https://superuser.com/questions/298201/how-can-i-play-a-sound-from-the-command-line-in-mac-os-x), and [Linux](https://superuser.com/questions/276596/play-mp3-or-wav-file-via-linux-command-line)). This [demo](https://www.youtube.com/watch?v=3J-m3hMW2Fo) seems to be using such an approach (Note: music starts from the page!).