home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / Data1.cab / _2F9B3B0C381244FB82B6B706373E7FE6 < prev    next >
Text File  |  2003-03-07  |  3KB  |  112 lines

  1. {LET}
  2.  
  3. Syntax
  4.  
  5. Let(Cell As String, Value)
  6.  
  7. PerfectScript Syntax
  8.  
  9. Let (Cell:String; Value:Any)
  10.  
  11. Description
  12.  
  13. With {LET}, you can enter a value into Location without moving to it. {LET} enters the value or string you specify with Value in Location.
  14.  
  15. You can use the optional Type argument to specify whether to store Value as an actual number or as a string. If you specify a formula as a string, the formula is written into Location as a string, not the resulting value. For example, {LET A1,B3*23:string} stores the formula B3*23 as a label in cell A1. If you omit Type, Quattro Pro tries to store the value as a numeric value; if unsuccessful, it stores the value as a string.
  16.  
  17. Location must be a cell address or cell name; you can use functions such as @CELLPOINTER as a Location in {LET} commands only if they return a cell address or cell name.
  18.  
  19. Value cannot be an @ARRAY formula. {LET} does not not enter array values. Use {PUTCELL} or {PUTCELL2} to enter array values.
  20.  
  21. You can use {LET} to invoke add-in @functions or macros contained in DLLs. Specify the add-in as Value, using this syntax for functions:
  22.  
  23.     @dllname.functionname(functionargument1, functionargument2, ...)
  24.  
  25.  
  26.  
  27. For example, this statement calls the @function MEDIAN, included in DLL Stats, with a five-item list as an argument and stores the result in Location G6:
  28.  
  29.     {LET G6,@Stats.MEDIAN(2,4,6,8,10)}
  30.  
  31.  
  32.  
  33. The macro syntax is identical:
  34.  
  35.     @dllname.macroname(macroargument1, macroargument2, ...)
  36.  
  37.  
  38.  
  39. Example
  40.  
  41. {LET(@CELLPOINTER("address")),99} makes the value of the active cell 99.
  42.  
  43. The examples below assume A1 contains the label 'Dear, A2 contains the label 'Sir, and A3 contains the value 25. The result is shown to the right of each {LET}.
  44.  
  45. \M    {LET F1,25}    25
  46.  
  47.     {LET F2,A3}    25
  48.  
  49.     {LET F3,+A1&""&A2}    Dear Sir
  50.  
  51.     {LET F4,+A1&""&A2:value}    Dear Sir
  52.  
  53.     {LET F5,+A1&""&A2:string}    +A1&""&A2
  54.  
  55.     {LET F6,+A1&A3}    ERR (because A3 is a value)
  56.  
  57. Parameters
  58.  
  59. Location    Cell in which to store the specified value
  60.  
  61. Value    Numeric or string value to be stored in Location
  62.  
  63. Type    String or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)
  64.  
  65. {Links}
  66.  
  67. Syntax
  68.  
  69. {Links.Option}
  70.  
  71. PerfectScript Syntax
  72.  
  73. Links_Change(OldName As String, NewName As String)
  74.  
  75. Links_Delete(LinkName As String)
  76.  
  77. Links_Open(LinkName As String)
  78.  
  79.  Links_Refresh(LinkName As String)
  80.  
  81. Description
  82.  
  83. {Links.Option} refreshes, changes, or deletes links in the active notebook.
  84.  
  85. LinkName is the name of the file being linked to. You can set LinkName to * to affect all links in the active notebook. If LinkName is omitted, the dialog box that normally performs the operation appears (and is under macro control; use {PAUSEMACRO} to pass control to the user).
  86.  
  87. Example
  88.  
  89. {Links.Refresh *} refreshes all links in the active notebook.
  90.  
  91. The following macro displays the Open Links dialog box and lets you select the name of a linked notebook to open.
  92.  
  93. {Links.Open}
  94.  
  95. {PAUSEMACRO}
  96.  
  97. Options
  98.  
  99. {Links.Change OldName, NewName}    Switches links from one file to another
  100.  
  101. {Links.Delete LinkName|*} (* = all links)    Deletes notebook links
  102.  
  103. {Links.Open LinkName|*} (* = all links)    Opens files linked to the active notebook
  104.  
  105. {Links.Refresh LinkName|*} (* = all links)    Refreshes links to unopened files
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.