Programmer's WorkBench (pwb.hlp) (Table of Contents; Topic list)
Begline Macro Example
 Description                               Up Contents Index Back
─────Programmer's WorkBench─────────────────────────────────────────────────
 
     The following macro moves the cursor to column one, then toggles
     between column one and the first nonblank character on the line.
 
          toggle_begline := Left ->x Meta :>x Begline
 
     The result of the Left function is tested to determine if the
     cursor is already in column one. If the cursor is in column one,
     PWB skips the Meta and executes Begline to move to the first
     nonblank character. If the cursor is not in column one,
     PWB executes Meta Begline to move there.
 
     Example
 
     This macro mimics the behavior of the BRIEF HOME key:
 
          bhome:= Meta Begline +> Home +> Begfile
 
     The result of Meta Begline (go to column 1 on the line) is tested
     to determine if the cursor moved. If the cursor moved, the test
     ('+>') succeeds and the macro exits. If the cursor did not move,
     the cursor is already in column 1, so the macro advances to the
     home position with Home. If the cursor did not move going to the
     home position, the macro advances to the beginning of the file
     with Begfile.
 
     See
 
     Left, Meta
     Cursor Movement Commands
                                    -♦-