Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

%CHAR() BIF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • %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
    %CHAR() BIF

    Make that %char(Field) - sorry

    Comment


    • #3
      %CHAR() BIF

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

      Comment


      • #4
        %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.

        Comment


        • #5
          %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 --------------------------------------------------------------------------------

          Comment


          • #6
            %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.

            Comment

            Working...
            X