Files
harbour-core/harbour/samples/cccppc/tostr.prg
1999-11-09 01:37:27 +00:00

36 lines
765 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* $Id$
*/
//*******************************************************************
// tostr.prg: <20>rtk -> string konverzi¢.
// 1998, Csisz r Levente
/*
1998.05.,21, Csisz r Levente
- Kivve a cslutils.prg -b“l.
*/
//*******************************************************************
function toStr(val)
// A val-t stringg alak¡tja
local type:=valType(val)
if (type=="N")
return allTrim(str(val))
elseif (type=="D")
return dtoc(val)
elseif (type=="L")
return if(val,"T","F")
elseif (type=="C" .or. type=="M")
return val
elseif (val==nil)
return "nil"
endif
alert("toStr: Nem konvert lhat¢ t¡pus: '"+type+"'")
return ""
//*******************************************************************