third_party_content:community:commentary:forums_nonworks:92aabcbc43e6f02385256890006254cc

Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 25 FEB 2000 12:54:02PM Matt Sorrell wrote:

I have run across a SETPTR function in one of our older programs. I cannot find any documentation on its use anywhere. In code, it is used as SETPTR(:CHAR(0),'1').

It seems to me that this function is redirecting / recapturing printer output. What leads me to believe this is the fact that there is a PRINTER ON statement immediately following this one.

I think it is possible that SETPTR() is not working correctly in that files that are supposed to be going to one directory are actually ending up in revboot instead.

Does anyone have any experience with this routing?

Thanks,

Matt Sorrell

msorrel@greyhound.com


At 25 FEB 2000 01:09PM Matt Sorrell wrote:

Well, SETPTR() is working correctly. I found out how the files got to the wrong place.

I still would like to know exactly what it does and what the arguements are, thougn.

-Matt


At 25 FEB 2000 01:43PM Jocelyn Amon wrote:

Larry Wilson has written some excellent documentation on this function. Check out:

http://rehabsw.tripod.com/arev_docs/printers.htm


At 28 FEB 2000 06:33PM Richard Hunt wrote:

Here ya go…

for the SETPTR(arg1,arg2) function…

arg1 is the DOS path and filename, and terminated with "CHAR(0)".

This consists of an optional drive specifier (c:), followed by a directory path, and then followed by a filename. No wildcard characters (* ?) are allowed.

arg2 is the actual option. There are two options. a number 1 and a "NOT" number 1.

The number 1 will create and truncate the file (clear the file).

All other numbers will create the file if necessary, and only append to the file (NOT clearing it).

arg2 does pass a result code (a DOS extended error code).

I definately would not use this function! use the "PDISK" instead.

Like this… SENTENCE=PDISK ':DOS_ID:' (O S)'

           EXECUTE SENTENCE

DOS_ID=the path and filename. And the (O S) part are the options. "O" being the overwrite, and "S" being the silent.

Then when you are done with the printer redirection use this command.

  SENTENCE=PDISK PRN (O S)'
  EXECUTE SENTENCE

This resets the printer back to the printer.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/92aabcbc43e6f02385256890006254cc.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1