View previous topic :: View next topic |
Author |
Message |
Zach
Joined: 13 Mar 2023 Posts: 85 Location: Groningen, Netherlands
|
Posted: Thu May 11, 2023 10:59 pm Post subject: Subroutine question |
|
|
Is there a better way to do this?
Because there will be a number of strings
wanting to be displayed.
program dBase
call execute_command_line("Cosmetics.exe")
call locate(1)
print*,'Have a nice day today'
read*
end program dBase
subroutine locate(z)
integer, intent(in)::z
if (z==1)call execute_command_line("LocateXY.exe 5 4")
end subroutine locate
Last edited by Zach on Fri May 12, 2023 2:08 am; edited 2 times in total |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2865 Location: South Pole, Antarctica
|
Posted: Fri May 12, 2023 1:31 am Post subject: |
|
|
Code: | subroutine locate(x,y)
integer, intent(in):: x, y
character*8 XYparams
write(XYparams,'(2i4)') X,Y
call execute_command_line('LocateXY.exe '//XYparams)
end subroutine locate
|
|
|
Back to top |
|
|
Zach
Joined: 13 Mar 2023 Posts: 85 Location: Groningen, Netherlands
|
Posted: Fri May 12, 2023 11:04 am Post subject: |
|
|
Dan, my jaw dropped off when I tried your code. Are you an earthly creature? How do you do it? An exceptionally effective response to my query! - For which many thanks! Patrick |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2865 Location: South Pole, Antarctica
|
Posted: Mon May 15, 2023 10:12 pm Post subject: |
|
|
Zach, Seems you were so impressed by my Antarctica whereabouts, many ask me. Also they often ask after that if this is true that the Earth is flat.
No, i am not in Antarctica...
currently. |
|
Back to top |
|
|
Zach
Joined: 13 Mar 2023 Posts: 85 Location: Groningen, Netherlands
|
Posted: Wed May 17, 2023 11:00 pm Post subject: |
|
|
No I wasn't impressed by your Antarctica. I was impressed by the code you responded with. Patrick. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2865 Location: South Pole, Antarctica
|
Posted: Fri May 19, 2023 3:41 am Post subject: |
|
|
Life is full of surprises. My code, computer, OS and other software, as well as people around and even entire society surprise me 50 times per day. Mostly with crazy behavior. |
|
Back to top |
|
|
Zach
Joined: 13 Mar 2023 Posts: 85 Location: Groningen, Netherlands
|
Posted: Tue May 23, 2023 5:49 pm Post subject: |
|
|
As Prince Charles, now King, put it, not knowing his mike was still active: "Bloody people!". |
|
Back to top |
|
|
|