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 

attach@ and Windows XP

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



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Tue Oct 17, 2006 8:09 pm    Post subject: attach@ and Windows XP Reply with quote

I tried to get an old (DOS/FTN77) directory search routine to work, and find that it can not attach to the directory I want.
The original code has a call to DIRENT@, but I found I had to replace it with FILES@.
I finally found that after attaching to the selected directory, I lost the attachment on exiting the program.
The following program is just the final attach@ call, but does not work as I expected, as the selected directory is lost when the program terminates.
Can the attach@ call update the local directory on exiting the program below ?
Does anyone know if this is a change with Windows XP, FTN95 or some other ?

! PROGRAM TO FIND THE SPECIFIED DIRECTORY
!
character cmnam*256, target_path*256, &
curdir@*256, default_path*256
integer*2 error_code
external cmnam, curdir@, attach@, doserr@
!
!--- get the local path
!
default_path = curdir@()
write (*,*) 'the current path is ', trim(default_path)
!
!--- read the command line for the directory
!
target_path = cmnam()
write (*,*) 'the target directory is ', trim(target_path)
!
write (*,*) 'Attaching to ',trim(target_path)
call attach@ (target_path, error_code)
call doserr@ (error_code)
! call exit (0)
!
end
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Oct 18, 2006 6:43 am    Post subject: attach@ and Windows XP Reply with quote

John

I think the short answer is no.

You can change the current working directory within the current process but it does not change the current working directory in the calling process. In other words, the change is only effective whilst the executable is running.
Back to top
View user's profile Send private message AIM Address
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