soccer jersey forums.silverfrost.com :: View topic - Subroutine question
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Subroutine question

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
Zach



Joined: 13 Mar 2023
Posts: 85
Location: Groningen, Netherlands

PostPosted: Thu May 11, 2023 10:59 pm    Post subject: Subroutine question Reply with quote

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
View user's profile Send private message Send e-mail
DanRRight



Joined: 10 Mar 2008
Posts: 2865
Location: South Pole, Antarctica

PostPosted: Fri May 12, 2023 1:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Zach



Joined: 13 Mar 2023
Posts: 85
Location: Groningen, Netherlands

PostPosted: Fri May 12, 2023 11:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
DanRRight



Joined: 10 Mar 2008
Posts: 2865
Location: South Pole, Antarctica

PostPosted: Mon May 15, 2023 10:12 pm    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message
Zach



Joined: 13 Mar 2023
Posts: 85
Location: Groningen, Netherlands

PostPosted: Wed May 17, 2023 11:00 pm    Post subject: Reply with quote

No I wasn't impressed by your Antarctica. I was impressed by the code you responded with. Patrick.
Back to top
View user's profile Send private message Send e-mail
DanRRight



Joined: 10 Mar 2008
Posts: 2865
Location: South Pole, Antarctica

PostPosted: Fri May 19, 2023 3:41 am    Post subject: Reply with quote

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
View user's profile Send private message
Zach



Joined: 13 Mar 2023
Posts: 85
Location: Groningen, Netherlands

PostPosted: Tue May 23, 2023 5:49 pm    Post subject: Reply with quote

As Prince Charles, now King, put it, not knowing his mike was still active: "Bloody people!".
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group