Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: What are the Mask characters? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: April 18 2018 at 09:56 | IP Logged Quote gg102

Dave,

I use a lot of strings in my app. I have figured out 2 of the mask/formatting characters. These are # and 0:

for a number of ".1"
# any digit other than 0. Used for dropping leading or trailing 0's
0 is used for digits including 0's.   
% does something similar to #, but I'm not sure what.

string(.1,"###.##") results in ".1"
string(.1,"###.00") results in ".10"
string(.1,"##0.00") results in "0.10"

I'm sure there are other mask/formatting characters. Can you please either list them, or point me to a link of the other mask characters?

Is there a space fill character for leading 0's?

Thank you.
Back to Top View gg102's Profile Search for other posts by gg102
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 18 2018 at 11:30 | IP Logged Quote dhoward

gg,

Try this link: https://www.appeon.com/support/documents/appeon_online_help/ pb2017r2/pbug/ch21s04.html.

This is part of the online help for PowerBuilder (the language that PowerHome is written in) so alot of the documentation concerning the PowerHome functions (most of the ones that don't start with ph_) can be found there. From the above link, you can reference all the format masks including number, string, date, etc.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: April 18 2018 at 11:35 | IP Logged Quote gg102

That's exactly what I was looking for.

Thanks Dave!
Back to Top View gg102's Profile Search for other posts by gg102
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum