Sheerpower®
A Guide to the Sheerpower Language


Previous Contents Index

EXAMPLE:

Example O-8 SmartCopy - Correcting multiple lines of text through replacement

  my_city$ = payroll(city) 
  my_state$ = payroll(state) 
  my_zipcode$ = payroll(zipcode) 
  my_country$ = payroll(country) 
  /.my = client  [CTRL/ENTER]
 
// result: 
 
  client_city$ = payroll(city) 
  client_state$ = payroll(state) 
  client_zipcode$ = payroll(zipcode) 
  client_country$ = payroll(country)   

O.1.2.6 Duplicating Lines of Text

FORMAT:


// on a single line: 
 
  `nn 
  
// on a code snippet or paragraph: 
 
  /`nn 

DESCRIPTION:

SmartCopy can also be used to duplicate one or more lines of code or text. The TICK MARK ("`") (located under the tilde on the far left top corner of most keyboards) tells SmartCopy that you want text duplicated. The value after the tick mark (nn) is the number of duplicates requested. You can request up to 99 duplicates.

The next example shows how to duplicate a single line three times:

Example O-9 SmartCopy - Duplicate A Single Line of Text

  print '------' 
  `3 
  // press [CTRL/ENTER] after "3" 
  
// result: 
 
  print '------'  // the original line 
  print '------' 
  print '------' 
  print '------' 

The example below shows how to make four duplicates of empty HTML table cells in this paragraph of HTML code by placing the leading forward slash "/" in front of the SmartCopy command:

Example O-10 SmartCopy - Duplicate Multiple Lines of Text

  <tr> 
    <td> 
    </td> 
  </tr> 
    /`4   
  // press the [CTRL/ENTER] after "4" 
 
// result: 
    
  <tr> 
    <td> 
    </td> 
  </tr> 
    
  <tr> 
    <td> 
    </td> 
  </tr> 
    
  <tr> 
    <td> 
    </td> 
  </tr> 
    
  <tr> 
    <td> 
    </td> 
  </tr> 
    
  <tr> 
    <td> 
    </td> 
  </tr> 

O.2 Smart Selection

When editing Sheerpower source program files (.SPINC and .SPSRC) in Sheerpower Rapid Development (SPDEV), Smart Selection is available, where double-clicks make smart decisions on what to select:


Index Contents