c function in R4GL
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi when you use c functions in R4gl char.strings have to be returned using retquote() which uses \\0 as terminator. If the string however already contains \\0 you are in trouble. How to overcome this. Both ways are acceptable: - skipping the \\0 and returning all other characters - returning the \\0 or perhaps changing the \\0 to another character Any solutions, thanks
Henk J. Sanders wrote: > > Hi > > when you use c functions in R4gl char.strings have to be returned using > retquote() which uses \\0 as terminator. > > If the string however already contains \\0 you are in trouble. > > How to overcome this. Both ways are acceptable: > > - skipping the \\0 and returning all other characters > - returning the \\0 > > or perhaps changing the \\0 to another character > > Any solutions, thanks A normal C string is terminated by a \\0. The Informix libraries use normal C strings. If you are trying to do something else, it won't work - the end of your string will be the character before the \\0. -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 -- If all else fails, read the instructions and the release notes. Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/