Solved TD-24287 - SalFilePutStr() encounters error when string variable is initialized to STRING_Null

Report bugs and possible workarounds.
Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 827
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

TD-24287 - SalFilePutStr() encounters error when string variable is initialized to STRING_Null

Post by Igor Ivanovic » 12 Dec 2018, 09:12

There is a regression in SalFilePutStr in handling of a string variable which was initialized with STRING_Null:

Code: Select all

Set Sbuff = STRING_Null
Set bOk = SalFilePutStr( hFile, sBuffer )
The above code will return FALSE and the empty line will not be written to the file.

In previous versions (TD7.0.5, TD6.3) it would return TRUE and the empty line would be written.
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1292
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-24287 - SalFilePutStr() encounters error when string variable is initialized to STRING_Null

Post by Dave Rabelink » 07 Mar 2019, 13:51

This is fixed in TD 7.1.2
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 827
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: TD-24287 - SalFilePutStr() encounters error when string variable is initialized to STRING_Null

Post by Igor Ivanovic » 11 Mar 2019, 06:02

This one is partially fixed.
It works fine if you set a local variable to STRING_Null, but not if you return it from a function:

Code: Select all

Function: LineWNull
	Description:
	Returns
		String:
	Parameters
	Static Variables
	Local variables
		String: sLine
	Actions
		Set sLine = STRING_Null
		Return sLine
If you call the function with

Code: Select all

	Call SalFilePutStr( hFile, LineWNull(  ) )
it will fail.
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1292
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-24287 - SalFilePutStr() encounters error when string variable is initialized to STRING_Null

Post by Dave Rabelink » 14 Jun 2019, 05:47

This is fixed in TD 7.1.3
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Applebot] and 0 guests