Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Formatting a display line

From: andrew:martin:colenso:school at: 24-Dec-2003 22:44

Steve wrote:
> Am I losing my mind or what?
No, just suffering from an overuse of COBOL... :) :D Try adding square brackets around the "integer!" function argument data-type specifier in 'ADD-FILLER. For example: ADD-FILLER: func [ "Add a specified number of blanks to FORMATTED-LINE" SPACE-COUNT [integer!] ] [ PRINT ["NOW WE WILL ADD " SPACE-COUNT " SPACES"] loop SPACE-COUNT [ append FORMATTED-LINE " " ;; 4444 PRINT ["FORMATTED LINE IS " LENGTH? FORMATTED-LINE BYTES: FORMATTED-LINE] ] ] Here's how I'd do the job: print map DATA-SELECTED func [Line [block!]] [ rejoin [ map Line func [Item] [ pad form Item 9 ] newline ] ] Of course that does involve using my 'map and 'pad functions, and assumes the same horizontal spacing per item in each line. Andrew J Martin Attendance Officer Speaking in tongues and performing miracles. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]