R0R0131@TAMVENUS.BITNET (THE ONE AND ONLY - RAVI) (07/26/88)
Date sent: 26-JUL-1988 11:50:57
Dear subscribers;
I have been using the vax for only four months now and I am not
very good at it.This is part of a program i am writing and i don't know
why it does not work....
|
|
|
$ esc[0,32] = %x01B
$ BEGIN:
$ IF P1 .EQS. "" THEN INQUIRE/NOPUN P1 "filename >"
$ IF P1 .EQS. "" THEN GOTO BEGIN
$ DEF = F$DIRECTORY()
$ ! what i am trying to do here is to search the current directory for P1.
$ IF F$SEARCH("''DEF':''P1') NES "" THEN GOTO RAT
$ WRITE SYS$OUTPUT esc+"#6"+"''P1' not found"
$ GOTO BEGIN
$ ! the part above is what is messing up - even if the file is not in the
$ ! current (sub)directory - the program says that the file is not there...
$ RAT:
|
|
|
What am i doing wrong ? - i am sorry if this is a very silly question.
any help will be appreciated.
thank you
- Ravi.
$!-----------------------------------------
$! Ravi Ramachandran Texas A&M University | ^ & ^ ^
$! College Station Texas . | /-\ & |\/|
$! AT&T 1 409 696 3496 |
$! )1988 | Gig'em Aggies !
$!---------------------------------------------------------------
$! | /---)_ |
$! | / _) |
$! | /----) ____ ____* |
$! | /\ # ) \ / / / |
$! |/ \______(____)\___\/ /_______/ |
$! --------------------------------------warner@hydrovax.nmt.edu (M. Warner Losh) (08/04/88)
(THE ONE AND ONLY - RAVI) writes... >$ esc[0,32] = %x01B >$ BEGIN: >$ IF P1 .EQS. "" THEN INQUIRE/NOPUN P1 "filename >" >$ IF P1 .EQS. "" THEN GOTO BEGIN >$ DEF = F$DIRECTORY() comment number 1 >$ ! what i am trying to do here is to search the current directory for P1. >$ IF F$SEARCH("''DEF':''P1') NES "" THEN GOTO RAT Comment number 2 >$ WRITE SYS$OUTPUT esc+"#6"+"''P1' not found" >$ GOTO BEGIN >$ ! the part above is what is messing up - even if the file is not in the >$ ! current (sub)directory - the program says that the file is not there... >$ RAT: Comment 1: Well, I have general found that using F$ENVIRONMENT("DEFAULT") to be much better than F$DIRECTORY() since it also gives you the current disk. This is really a minor point. Comment 2: If the current default is [RAVI] and the file name is FRED.FRED, then you program was trying to search for [RAVI]:FRED.FRED, which VMS (or should I say RMS) doesn't like very much. You should try something more like $ IF F$SEARCH("''DEF'''P1') .NES. "" THEN GOTO RAT since that would do something more like [RAVI]FRED.FRED, which is what you want. Other than that, everything else looks good..... Warner Losh hydrovax@nmt.edu -or- hydrovax%nmt@relay.cs.net Still looking for a spelling program for NNTP. Maybe a different editor would help....