+ Reply to Thread
Results 1 to 6 of 6

Thread: %CHAR() BIF

  1. #1
    Guest.Visitor Guest

    Default %CHAR() BIF

    Bill - How about evalr result = Zeros + char(field); Zeros defined as constant of however many zeros it takes to fill field. Bill

  2. #2
    Guest.Visitor Guest

    Default %CHAR() BIF

    Make that %char(Field) - sorry

  3. #3
    Guest.Visitor Guest

    Default %CHAR() BIF

    Edit code X will maintain your leading zeros. (May not be appropriate if your numbers might be negative, though.)

  4. #4
    Guest.Visitor Guest

    Default %CHAR() BIF

    But if the amount can have decimal positions, %editc 'X' will lose the decimal point, won't it? Also, if the result field is longer than the edited value, you still need to fill with leading zeros.

  5. #5

    Default %CHAR() BIF

    I posted this inquiry as a reply to another post and I apologize to all again. I've got a program that displays journal entries that have been archived to a membered file. The member display can be sorted by date or by journal name. Upon selection of the journal to look at it can be sorted by date, account #, location, or amount. Where I have run into a snag is with the amount. I use a dataQ to sort the subfile and determine the key by cursor location. I use the %char() bif to move the date or amount into the key. Then load the queue and read it back to the subfile in key sequence. The amounts get left justified with no leading zeros, this causes the sort to get real funny looking. I know I can do a straight MOVE, but the program is in free form and I would like to keep it completely free. I know I am being stubborn, but this is an excercise and I'd like to find a way to do this. TIA Bill --------------------------------------------------------------------------------

  6. #6
    Guest.Visitor Guest

    Default %CHAR() BIF

    True, but you can always %REPLACE a decimal point into the string. Also, you could prepend a fixed number of blanks to the string. The original poster now has a couple of options to choose from.

+ Reply to Thread

Similar Threads

  1. %char, need leading zeroes
    By Guest.Visitor in forum RPG
    Replies: 3
    Last Post: 08-18-2006, 05:20 AM
  2. %Char
    By Guest.Visitor in forum General
    Replies: 1
    Last Post: 05-26-2005, 09:10 AM
  3. Char to Numeric using %DEC in Error
    By Guest.Visitor in forum RPG
    Replies: 2
    Last Post: 12-29-2003, 06:42 AM
  4. Char to ASCII
    By Guest.Visitor in forum RPG
    Replies: 6
    Last Post: 09-13-2002, 12:14 PM
  5. %CHAR interferes with Qp0zSpawn() API
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 01-10-2001, 07:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts