No output with VisFileWriteString or SalFilePutString

forum.gupta.bugreport (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

No output with VisFileWriteString or SalFilePutString

Post by NewsgroupServer » 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.

Attachment: writetofile.apt

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

No output with VisFileWriteString or SalFilePutString

Post by NewsgroupServer » 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/

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

No output with VisFileWriteString or SalFilePutString

Post by NewsgroupServer » 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 [Crawler] and 0 guests