No output with VisFileWriteString or SalFilePutString

forum.gupta.bugreport (2005-2010)
Philip Hautekiet

No output with VisFileWriteString or SalFilePutString

Post by Philip Hautekiet » 06 Feb 2008, 09:56

 Posted by:  Philip Hautekiet 

We noticed we cannot write output to a text file.
Is this because we have a 45 day trial version of Centura 5.1 ?

Can anybody confirm this.
Here a sample with Sal and Vis functions (vtfile.apl) and the verify with
notepad.exe.

Create a map c:\infohos to test, or change the name of the ouptut file in
dfFile.

Thanks in advance.

You do not have the required permissions to view the files attached to this post.

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2371
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: No output with VisFileWriteString or SalFilePutString

Post by Jeff Luther » 06 Feb 2008, 17:50

 Posted by:  Jeff Luther 

Wrong decl. for SalFileOpen... It needs to be:

SalFileOpen( hFile, dfFile, OF_Create | OF_Write )

Without that second flag the assumed mode is OF_Read. (Also assumed in
the above is OF_Text. If you ever write a binary file you need to add
OF_Binary).

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/unify/

Philip Hautekiet

Re: No output with VisFileWriteString or SalFilePutString

Post by Philip Hautekiet » 07 Feb 2008, 08:52

 Posted by:  Philip Hautekiet 

The last decade I (and all my collegues I teached Centura 1.5.1 PTF5) used
OF_Create, and it worked.
We'll review our code and try it out.

Thanks Jef.

Return to “gupta.bugreport”

Who is online

Users browsing this forum: [Ccbot] and 0 guests