Page 1 of 1

uf_get_pb_version() to report PowerBuilder's version

PostPosted: 16 Apr 2013, 12:24
by Ursego
Code: Select all
/*----------------------------------------------------------------------------------------------------------------------
Acc:   public
-----------------------------------------------------------------------------------------------------------------------
Dscr:   returns the major version number of PowerBuilder, for example: "9" (not "9.0"!)
------------------------------------------------------------------------------------------------------------------------
Ret:   PB version as string
----------------------------------------------------------------------------------------------------------------------*/
string      ls_pb_version
int         li_rc
environment   lenv

li_rc = GetEnvironment(ref lenv)
if li_rc <> 1 then return '<<<Error in n_util.uf_get_pb_version>>>'

ls_pb_version = String(lenv.pbmajorrevision)

return ls_pb_version

//Some more fields which can be useful:
//lenv.pbminorrevision
//lenv.pbfixesrevision
//lenv.pbbuildnumber