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.
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.
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.
Value cannot be an @ARRAY formula. {LET} does not not enter array values. Use {PUTCELL} or {PUTCELL2} to enter array values.
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:
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:
{LET(@CELLPOINTER("address")),99} makes the value of the active cell 99.
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}.
\M {LET F1,25} 25
{LET F2,A3} 25
{LET F3,+A1&""&A2} Dear Sir
{LET F4,+A1&""&A2:value} Dear Sir
{LET F5,+A1&""&A2:string} +A1&""&A2
{LET F6,+A1&A3} ERR (because A3 is a value)
Parameters
Location Cell in which to store the specified value
Value Numeric or string value to be stored in Location
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)
{Links}
Syntax
{Links.Option}
PerfectScript Syntax
Links_Change(OldName As String, NewName As String)
Links_Delete(LinkName As String)
Links_Open(LinkName As String)
Links_Refresh(LinkName As String)
Description
{Links.Option} refreshes, changes, or deletes links in the active notebook.
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).
Example
{Links.Refresh *} refreshes all links in the active notebook.
The following macro displays the Open Links dialog box and lets you select the name of a linked notebook to open.
{Links.Open}
{PAUSEMACRO}
Options
{Links.Change OldName, NewName} Switches links from one file to another
{Links.Delete LinkName|*} (* = all links) Deletes notebook links
{Links.Open LinkName|*} (* = all links) Opens files linked to the active notebook
{Links.Refresh LinkName|*} (* = all links) Refreshes links to unopened files