![]() | ![]() | ![]() | ![]() | ![]() |
BreakAt() |
This is a rexx function provided by PPWIZARD. This routine (like all PPWIZARD extensions) can be used with any operating system supported by PPWIZARD.
This function gets passed a string and ensures that no component is larger than a value you specify. It is useful for automatically breaking up long URLs in tables etc so a column does not get too wide. The function takes the following parameters:
The resultant string is returned.
EXAMPLE |
This example shows a table where the first column contains a URL as a hypertext link to the URL shown. We don't wish the column to be wider than 18 characters (longer URLs will span multiple lines).
;--- Define a macro to (1) Create link (2) split up long URLS --- #define LinkToDisplayedURL \ #evaluate "TmpResult" @BreakAt(18, '{$URL}')@ \ <A TARGET=_top HREF="http://{$URL}"> \ <$TmpResult></A> \ #undef TmpResult ;--- Example of use in a table ---------------------------------- <BR><CENTER><TABLE COLS=2 BORDER=5 CELLSPACING=5> ;------------------------------------------------------------ <TR> <TH ALIGN=CENTER>http:// <TH ALIGN=CENTER>Information</B> </TR> ;------------------------------------------------------------ <TR> <TD ALIGN=CENTER><$LinkToDisplayedURL URL="www.geocities.com/SiliconValley/Heights/6121/"> <TD ALIGN=CENTER> Programmer's Info Page. </TR> </TABLE></CENTER>
![]() | ![]() | ![]() | ![]() | ![]() |