Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Articles
Search: 

Padr(), Padc(), Padl() take numbers and dates as well
Dragan Nedeljkovich, November 27, 1999
As described in the help, padr('abc',20) will give a string with 17 trailing blanks - but try padc(12, 13), or padl(date(), 20) - you will get a string containing the string representation of number 12 or today's date, padded with blanks (or any other string you choose) on the side of your choice. ...
Summary
As described in the help, padr('abc',20) will give a string with 17 trailing blanks - but try padc(12, 13), or padl(date(), 20) - you will get a string containing the string representation of number 12 or today's date, padded with blanks (or any other string you choose) on the side of your choice. Try padc(datetime(), 80, '-*- ') and see what you get.
Dragan Nedeljkovich, Now officially retired
After (and/or along with) playing with Sinclair ZX Spectrum and Atari ST, I left teaching in 1986 and went through a series of machines and operating systems: CP/M (Cobol, Turbo pascal, CB-80 Basic), PDP and VAX (Cobol, Basic Plus 2, scripts), DOS 3.1 through 7.0, Windows 3.1 through XP. Ran several (almost) forgotten networks - RPTI, Lantastic, WFWG, Novell 2.x, 3.x, 4.x, Windows peer-to-peer and eventually NT and just plain IP (Win/Lin mix). After a brief flirt with Clipper in 1988, discovered Fox and went through mFoxplus 2.1 (DOS), Foxplus (Xenix), FP 1.01, 1.02, 2.0, 2.6, VFP 3.0 (briefly), 5.0, 6.0 (SP 1 to 5), 7.0 SP1, 8SP1 and now 9. Maintained one framework, created another (in DOS Fox), helped create yet another one, then used a few more - bought or in-house - frameworks. Always too lazy to type the same sequence more than four times, I'd rather write a builder or some Intellisense. Along the way, promoted a dozen beginners into experienced programmers. IOW, been there, done that, the T-shirts are recycled already, and it's still interesting and fun way to live. Retired in 2019 and finally found time for those pet projects... in Dabo/Python.
More articles from this author
Dragan Nedeljkovich, January 31, 2007
Generally, datasessions serve this purpose - they create an isolated environment where our code can run and use tables, cursors etc as it pleases, without disturbing other code. Sometimes wee need a little more granularity - to have a routine which may create any number of cursors, open additional t...
Dragan Nedeljkovich, November 1, 2006
In this article, Dragan Nedeljkovich talks about how to rebuild from Class Browser's export functionality. Ever since Visual FoxPro 3, we have had the object browser. It has this nice feature to export a class or a form as code. Five versions later, it is still there. But, it still produces out code...
Dragan Nedeljkovich, November 5, 2000
There's a problem of the DataEnvironment which exists in the .scx but not in the .vcx, so when a form is createobject()ed, it has no DE. There are several ways to create one - either in the form designer, or using a session class, or simply opening the tables in code and avoiding the DE altogether (...
Dragan Nedeljkovich, December 2, 2002
This FAQ describes some considerations to take care of when using spaces in directory names when being used with macro substitution.
Dragan Nedeljkovich, September 1, 2006
Following a thread on the Universal Thread, Dragan Nedeljkovich wrote this article on how to make the totals below the grid scroll horizontally together with the grid. Sometimes, we only wish we wrote this much earlier. This article describes a way to calculate those totals, creating fields in some ...