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

  1. {RANDOM}
  2.  
  3. Description
  4.  
  5. {RANDOM} generates cells of random values drawn from a selected distribution. It is equivalent to the Random Number analysis tool. {RANDOM} has a different format for the following distribution types:
  6.  
  7. Uniform    Every value has an equal probability of being selected.
  8.  
  9. Normal    Has the qualities of a symmetrical, bell-shaped curve.
  10.  
  11. Bernoulli    Has two possible outcomes, failure or success, represented by 0 and 1.
  12.  
  13. Binomial    Represents the distribution of successful outcomes in a given number of independent Bernoulli trials.
  14.  
  15. Poisson    The distribution of values in any interval depends on the length of the interval and the constant Lambda, the expected number of occurrences in an interval
  16.  
  17. Patterned    A pattern of repeated values and sequences.
  18.  
  19. Discrete    Every value in designated cells has a specified probability of being selected (the cumulative probabilities equal 1).
  20.  
  21. {RANDOM} - Uniform Distribution
  22.  
  23. Syntax
  24.  
  25. {RANDOM OutBlock, Columns, Rows, 1, Seed, LowerBound, UpperBound}
  26.  
  27. PerfectScript Syntax
  28.  
  29. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  30.  
  31. Description
  32.  
  33. When the Distribution argument equals 1, {RANDOM} generates random values drawn from a uniform distribution.
  34.  
  35. Parameters
  36.  
  37. OutBlock    Upper-left cell of the output cells
  38.  
  39. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  40.  
  41. Rows    A value indicating the number of rows of random numbers to generate for each column
  42.  
  43. 1     Indicates uniform distribution
  44.  
  45. Seed    Starting number for the random-number-generation algorithm
  46.  
  47. LowerBound    A value indicating the lower bound on the set of numbers to generate
  48.  
  49. UpperBound    A value indicating the upper bound on the set of numbers to generate
  50.  
  51. {RANDOM} - Normal Distribution
  52.  
  53. Syntax
  54.  
  55. {RANDOM OutBlock, Columns, Rows, 2, Seed, Mean, SDev}
  56.  
  57. PerfectScript Syntax
  58.  
  59. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  60.  
  61. Description
  62.  
  63. When the Distribution argument equals 2, {RANDOM} generates random values drawn from a normal distribution.
  64.  
  65. Parameters
  66.  
  67. OutBlock    Upper-left cell of the output cells
  68.  
  69. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  70.  
  71. Rows    A value indicating the number of rows of random numbers to generate for each column
  72.  
  73. 2    Indicates normal distribution
  74.  
  75. Seed    Starting number for the random-number-generation algorithm
  76.  
  77. Mean    A value indicating the mean of the set of numbers to generate
  78.  
  79. SDev    A value indicating the standard deviation of the set of numbers to generate
  80.  
  81. {RANDOM} - Bernoulli Distribution
  82.  
  83. Syntax
  84.  
  85. {RANDOM OutBlock, Columns, Rows, 3, Seed, Prob}
  86.  
  87. PerfectScript Syntax
  88.  
  89. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  90.  
  91. Description
  92.  
  93. When the Distribution argument equals 3, {RANDOM} generates random values drawn from a Bernoulli distribution.
  94.  
  95. Parameters
  96.  
  97. OutBlock    Upper-left cell of the output cells
  98.  
  99. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  100.  
  101. Rows    A value indicating the number of rows of random numbers to generate for each column
  102.  
  103. 3    Indicates Bernoulli distribution
  104.  
  105. Prob     Starting number for the random-number-generation algorithm
  106.  
  107. Seed    A value indicating the probability of success on each trial run; must be greater than or equal to 0 and less than or equal to 1
  108.  
  109. {RANDOM} - Binomial Distribution
  110.  
  111. Syntax
  112.  
  113. {RANDOM OutBlock, Columns, Rows, 4, Seed, Prob, Trials}
  114.  
  115. PerfectScript Syntax
  116.  
  117. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  118.  
  119. Description
  120.  
  121. When the Distribution argument equals 4, {RANDOM} generates random values drawn from a binomial distribution.
  122.  
  123. Parameters
  124.  
  125. OutBlock    Upper-left cell of the output cells
  126.  
  127. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  128.  
  129. Rows    A value indicating the number of rows of random numbers to generate for each column
  130.  
  131. 4    Indicates binomial distribution
  132.  
  133. Seed    Starting number for the random-number-generation algorithm
  134.  
  135. Prob    A value indicating the probability of success on each trial run; must be greater than or equal to 0 and less than or equal to 1
  136.  
  137. Trials    A value indicating the number of trials
  138.  
  139. {RANDOM} - Poisson Distribution
  140.  
  141. Syntax
  142.  
  143. {RANDOM OutBlock, Columns, Rows, 5, Seed, Lambda}
  144.  
  145. PerfectScript Syntax
  146.  
  147. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  148.  
  149. Description
  150.  
  151. When the Distribution argument equals 5, {RANDOM} generates random values drawn from a Poisson distribution.
  152.  
  153. Parameters
  154.  
  155. OutBlock    Upper-left cell of the output cells
  156.  
  157. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  158.  
  159. Rows    A value indicating the number of rows of random numbers to generate for each column
  160.  
  161. 5    Indicates Poisson distribution
  162.  
  163. Seed    Starting number for the random-number-generation algorithm
  164.  
  165. Lambda    A parameter to the Poisson distribution representing the expected number of events in each unit
  166.  
  167. {RANDOM} - Patterned Distribution
  168.  
  169. Syntax
  170.  
  171. {RANDOM OutBlock, Columns, Rows, 6, Seed, LowerBound, UpperBound, Step, RepeatNumber, RepeatSequence}
  172.  
  173. PerfectScript Syntax
  174.  
  175. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  176.  
  177. Description
  178.  
  179. When the Distribution argument equals 6, {RANDOM} generates random values drawn from a patterned distribution.
  180.  
  181. Parameters
  182.  
  183. OutBlock    Upper-left cell of the output cells
  184.  
  185. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  186.  
  187. Rows    A value indicating the number of rows of random numbers to generate for each column
  188.  
  189. 6    Indicates patterned distribution
  190.  
  191. Seed    Starting number for the random-number-generation algorithm
  192.  
  193. LowerBound    A value indicating the lower bound on the set of numbers to generate
  194.  
  195. UpperBound    A value indicating the upper bound on the set of numbers to generate
  196.  
  197. Step    Increment value between LowerBound and UpperBound
  198.  
  199. RepeatNumber    A value indicating the number of times to repeat each value
  200.  
  201. RepeatSequence    A value indicating the number of times to repeat each sequence of values
  202.  
  203. {RANDOM} - Discrete Distribution
  204.  
  205. Syntax
  206.  
  207. {RANDOM OutBlock, Columns, Rows, 7, Seed, InBlock}
  208.  
  209. PerfectScript Syntax
  210.  
  211. RANDOM (OutBlock:String; Columns:Numeric; Rows:Numeric; Type:Enumeration {Uniform!; Normal!; Bernoulli!; Binomial!; Poisson!; Patterned!; Discrete!}; Seed:Numeric; Parameter1:Any; [Parameter2:Numeric]; [Parameter3:Numeric]; [Parameter4:Numeric]; [Parameter5:Numeric])
  212.  
  213. Description
  214.  
  215. When the Distribution argument equals 7, {RANDOM} generates random values drawn from a discrete distribution.
  216.  
  217. Parameters
  218.  
  219. OutBlock    Upper-left cell of the output cells
  220.  
  221. Columns    A value indicating the number of random-number sets to generate; default is the number of columns in OutBlock
  222.  
  223. Rows    A value indicating the number of rows of random numbers to generate for each column
  224.  
  225. 7    Indicates discrete distribution
  226.  
  227. Seed    Starting number for the random-number-generation algorithm
  228.  
  229. InBlock    One or more numeric cell values representing the input cells, which contain a range of values and their probabilities, each in a separate column
  230.  
  231. {RANKPERC}
  232.  
  233. Syntax
  234.  
  235. {RANKPERC InBlock,OutBlock,<Grouped>,<Labels(0|1)>}
  236.  
  237. PerfectScript Syntax
  238.  
  239. RANKPERC (InBlock:String; OutBlock:String; [Grouped:String]; [Labels?:Enumeration {Yes!; No!}])
  240.  
  241. Description
  242.  
  243. {RANKPERC} returns the ordinal and percent rank of each value in InBlock. {RANKPERC} is equivalent to the Rank and Percentile analysis tool.
  244.  
  245. Parameters
  246.  
  247. InBlock    Input cells containing one or more columns or rows of numeric values
  248.  
  249. OutBlock    Upper-left cell of the output cells
  250.  
  251. Grouped    "C" to group results by column or "R" to group results by row; the default is "C"
  252.  
  253. Labels    1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0
  254.  
  255. {READ}
  256.  
  257. Syntax
  258.  
  259. {READ #Bytes,Location}
  260.  
  261. Description
  262.  
  263. {READ} reads #Bytes bytes of characters from a file previously opened using {OPEN} (starting at the current position of the file pointer), and stores them as a label in Location. The file is left unchanged, and the file pointer moves to the position following the last character read. (See {GETPOS} for a discussion of the file pointer.)
  264.  
  265. {READ} is similar to {READLN}, except for two differences. While {READLN} reads one line of characters (terminated by a carriage-return/linefeed pair), {READ} reads the precise number of characters specified. This lets you read, for example, fields within a record rather than an entire record. The second difference is that while {READLN} strips out the carriage-return/linefeed pair at the end of a line, {READ} manipulates these as if they were no different from other characters. If you use {READ} to read a file created by {WRITELN}, you will see two graphics characters at the end of each string read. These are the carriage return and linefeed characters. {READ} is best used only in conjunction with {WRITE}, or when you know the text file structure in detail.
  266.  
  267. If {READ} succeeds, macro execution continues in the cell below the cell containing the {READ} command; if {READ} fails, macro execution continues in the same cell.
  268.  
  269. Example
  270.  
  271. This macro opens a text file containing a phone directory database, and reads a name and phone number from the third record. The macro that created this text file is shown in the description of {WRITE}:
  272.  
  273. \L    {OPEN "A:PHONEDIR.PRN",R}
  274.  
  275.     {SETPOS rec_length*(rec_number-1)}
  276.  
  277.     {READ name_length,name}
  278.  
  279.     {READ phone_length,phone}
  280.  
  281.     {CLOSE}
  282.  
  283.     
  284.  
  285. rec_number    3
  286.  
  287. rec_length    28
  288.  
  289. name_length    14
  290.  
  291. phone_length    12
  292.  
  293. name    Hall, Sue Ann
  294.  
  295. phone    617-555-5678
  296.  
  297. Parameters
  298.  
  299. #Bytes    Number of bytes of characters to read from a file
  300.  
  301. Location    Cell in which to store the characters read
  302.  
  303. {READLN}
  304.  
  305. Syntax
  306.  
  307. {READLN Location}
  308.  
  309. Description
  310.  
  311. {READLN} is like {READ}, but instead of using a number of bytes to determine the amount of text to read, {READLN} reads forward from the current file pointer location up to and including the carriage-return/linefeed at the end of the line. Unlike {READ}, it does not read the carriage return/linefeed into the cell. (See {GETPOS} for a discussion of the file pointer.)
  312.  
  313. Use {READ} to read lines from a record-structured file, where the lines are of uniform length. {READLN} can read the contents of a file one row at a time, making formatting of the data easier than {READ}.
  314.  
  315. Like the other file-access macros, if {READLN} fails, the macro continues execution in the current cell. If it is successful, the macro skips to the row below, and execution continues there. {ONERROR} can be used to trap disk and file errors, such as a disk drive door being left open.
  316.  
  317. Example
  318.  
  319. The following macro opens the text file TEST.TXT, reads in a line, and calculates the length of the line by subtracting the starting position from the ending position, then subtracting 1 from the result. This adjustment is necessary because the carriage-return and linefeed characters found at the end of each line in a typical text file are stripped away by Quattro Pro when the text is read into cells. The macro that created the file TEST.TXT is shown in the description of {WRITELN}.
  320.  
  321. \M    {OPEN "A:TEST.TXT",R}
  322.  
  323.     {GETPOS start}
  324.  
  325.     {READLN input}
  326.  
  327.     {GETPOS end}
  328.  
  329.     {CLOSE}
  330.  
  331.     {LET num_char,+(end-start)-1}
  332.  
  333.     
  334.  
  335. start    0
  336.  
  337. end    22
  338.  
  339. num_char    21
  340.  
  341. input    This is a short line.
  342.  
  343. Parameters
  344.  
  345. Location    Cell in which to store the characters read
  346.  
  347. {RECALC}
  348.  
  349. Syntax
  350.  
  351. {RECALC Location,<Condition>,<Iteration#>}
  352.  
  353. PerfectScript Syntax
  354.  
  355. Recalc (Block:String; [Condition:Any]; [Iteration:Numeric])
  356.  
  357. Description
  358.  
  359. {RECALC} causes Quattro Pro to recalculate a specified portion of the notebook in a row-by-row order. This is different from normal recalculation, where Quattro Pro recalculates the entire notebook in natural order; that is, before a formula calculates, each cell it references is recalculated first.
  360.  
  361. With the optional Condition argument, you can tell Quattro Pro to recalculate formulas in cells repeatedly until the specified condition is met. You can also supply Iteration# to specify the maximum number of times to recalculate formulas trying to satisfy Condition. To use Iteration#, Condition must also be supplied.
  362.  
  363. {RECALC} is useful for rapid recalculation of specified parts of a notebook, particularly when the notebook is so large that global recalculations would significantly slow your work.
  364.  
  365. {RECALC} overrides the recalculation method specified for the notebook, enforcing row-by-row recalculation. If all the formulas reference only cells above, or to the left in the same row, the notebook will be correctly calculated. If there are references to cells to the left and below, you must use {RECALCCOL}. If there are references to cells below or to the right in the same row as your formula, you must use {CALC} to recalculate the entire notebook.
  366.  
  367. {RECALC} displays the results of recalculation.
  368.  
  369. If there are formulas within the cells being recalculated that depend on formulas outside of the cells, they might not evaluate correctly. Make sure Location encompasses all the cells referenced by formulas within the cells.
  370.  
  371. Parameters
  372.  
  373. Location    Cells to recalculate
  374.  
  375. Condition    Condition to be met before recalculation is halted (optional)
  376.  
  377. Iteration#    Maximum number of times to recalculate Location trying to meet Condition (optional)
  378.  
  379. {RECALCCOL}
  380.  
  381. Syntax
  382.  
  383. {RECALCCOL Location,<Condition>,<Iteration#>}
  384.  
  385. PerfectScript Syntax
  386.  
  387. RecalcCol (Block:String; [Condition:Any]; [Iteration:Numeric])
  388.  
  389. Description
  390.  
  391. {RECALCCOL} recalculates the specified portion of a notebook in column-by-column order. It is similar to {RECALC}, which recalculates row by row. See {RECALC} for information on when {RECALCCOL} is appropriate and when you need to use {CALC} instead.
  392.  
  393. Parameters
  394.  
  395. Location    Cells to recalculate
  396.  
  397. Condition    Condition to be met before recalculation is halted (optional)
  398.  
  399. Iteration#    Maximum number of times to recalculate Location trying to meet Condition (optional)
  400.  
  401. {RefreshMenuBar}
  402.  
  403. Syntax
  404.  
  405. {RefreshMenuBar}
  406.  
  407. PerfectScript Syntax
  408.  
  409. RefreshMenuBar ()
  410.  
  411. Description
  412.  
  413. Refreshes the menu bar.
  414.  
  415. {RefreshScreenOn} and {RefreshScreenOff}
  416.  
  417. Description
  418.  
  419. {RefreshScreenOn} and {RefreshScreenOff} turn on or off the repainting of Quattro Pro behind an active dialog box.
  420.  
  421. {REGRESS}
  422.  
  423. Syntax
  424.  
  425. {REGRESS InBlockY, InBlockX, YIntZero(0|1), Labels(0|1), Confidence, SumOutBlock, Residuals(0|1), StdResiduals(0|1), <ResidualOutBLock>, <ProbOutBlock>}
  426.  
  427. PerfectScript Syntax
  428.  
  429. REGRESS (InBlockY:String; InBlockX:String; YIntZero?:Enumeration {Yes!; No!}; Labels?:Enumeration {Yes!; No!}; Confidence:Numeric; SumOutBlock:String; Residuals?:Enumeration {Yes!; No!}; StdResiduals?:Enumeration {Yes!; No!}; [ResidualOutBlock:String]; [ProbOutBlock:String])
  430.  
  431. Description
  432.  
  433. {REGRESS} performs multiple linear regression analysis. {REGRESS} is equivalent to the Advanced Regression analysis tool.
  434.  
  435. Parameters
  436.  
  437. InBlockY    Input cells containing a single column of y values (the dependent variables)
  438.  
  439. InBlockX    Input cells containing one or more columns of x values (the independent variables)
  440.  
  441. YIntZero    1 if the y-intercept is 0 (the line of regression passes through the origin); 0 if the y-intercept is not 0
  442.  
  443. Labels    1 if labels are located in the first column or row of the InBlockY and InBlockX; 0 if the input selections do not contain labels
  444.  
  445. Confidence    A value indicating the confidence level to apply to the regression
  446.  
  447. SumOutBlock    Upper-left cell of the output cells for the summary table (allow at least seven columns)
  448.  
  449. Residuals    1 or 0; if 1, includes residuals in the output table
  450.  
  451. StdResiduals    1 or 0; if 1, includes standardized residuals in the output table
  452.  
  453. ResidualOutBlock    Upper-left cell of the output cells for the residuals table (allow at least four columns)
  454.  
  455. ProbOutBlock    Upper-left cell of the output cells for the probabilities table (allow at least two columns)
  456.  
  457. {Regression}
  458.  
  459. Syntax
  460.  
  461. {Regression.Option}
  462.  
  463. PerfectScript Syntax
  464.  
  465. Regression_Dependent (Block:String)
  466.  
  467. Regression_Go ()
  468.  
  469. Regression_Independent (Block:String)
  470.  
  471. Regression_Output (Block:String)
  472.  
  473. Regression_Reset ()
  474.  
  475. Regression_Y_Intercept (Mode:String)
  476.  
  477. Description
  478.  
  479. {Regression} performs a regression analysis to show the relationship between a set of independent variables and a dependent variable.
  480.  
  481. {Regression.Dependent} indicates the dependent-variable cells. {Regression.Independent} defines the independent variables. In {Regression.Independent}, Block can be noncontiguous with one variable to a column. The dependent and independent selections must all have the same number of rows.
  482.  
  483. {Regression.Output} indicates where to store the table of regression results. {Regression.Y_Intercept} specifies whether to compute the Y-intercept, or set it to zero. You can use {Regression.Reset} to clear all settings. Use {Regression.Go} after the other command equivalents to perform the regression analysis. If data changes within the independent or dependent data selections, use {Regression.Go} again to calculate a new regression table.
  484.  
  485. You can use {Regression?} or {Regression!} to display the Linear Regression dialog box. {Regression?} lets you manipulate the dialog box, whereas {Regression!} relies on the macro to manipulate it.
  486.  
  487. Example
  488.  
  489. The following macro sets these data selections: Independent, B2..D16; Dependent, F2..F16. The last statement performs the regression analysis and stores the results in the cells with upper-left cell H2.
  490.  
  491. {Regression.Independent A:B2..A:D16}
  492.  
  493. {Regression.Dependent A:F2..A:F16}
  494.  
  495. {Regression.Output A:H2}
  496.  
  497. {Regression.Go}
  498.  
  499. Options
  500.  
  501. {Regression.Dependent Block}    Specifies the cells (partial column) containing independent variable (y-axis) data
  502.  
  503. {Regression.Go}    Performs the regression analysis
  504.  
  505. {Regression.Independent Block}    Specifies cells containing up to 150 columns of independent variable (x-axis) data
  506.  
  507. {Regression.Output Block}    Specifies the cells where results will be written
  508.  
  509. {Regression.Reset}    Clears all regression settings
  510.  
  511. {Regression.Y_Intercept Compute|Zero}    Specifies whether to force the y-intercept value to zero or whether to compute it
  512.  
  513. {REQUEST}
  514.  
  515. Syntax
  516.  
  517. {REQUEST DDEChannel,DataToReceive,DestBlock}
  518.  
  519. PerfectScript Syntax
  520.  
  521. Request (DDEChannel:Numeric; DataToReceive:String; DestBlock:String)
  522.  
  523. Description
  524.  
  525. {REQUEST} gets information specified by DataToReceive from applications that support Dynamic Data Exchange (DDE). This information is stored in DestBlock. DataToReceive is a string representing the location of the data to receive in the other application. In Quattro Pro, this could be cells such as A2..A7 or a property such as "(Application.Display)". If requesting a property, the property must be enclosed in parentheses. You must use {INITIATE} to open a channel of communication and obtain the value DDEChannel before using {REQUEST}.
  526.  
  527. If your conversation is not within a specific topic (in other words, you opened the channel using the command {INITIATE AppName,"System",DDEChannel}), you can use the following strings in DataToReceive, depending on the application:
  528.  
  529. Arguments for DataToReceive
  530.  
  531. String    Purpose
  532.  
  533. "SysItems"    A listing of all strings you can use with DataToReceive. You can use this command first to view other choices offered by AppName.
  534.  
  535. "Topics"    A listing of all topics open. For example, a list of open documents under Word for Windows.
  536.  
  537. "Status"    The current status of the application. For example, READY in Excel or EDIT in Quattro Pro when a cell is being edited.
  538.  
  539. "Formats"    A list of all Clipboard formats supported by the application or DDE link.
  540.  
  541. "Selection"    A list of all items currently selected in the application. For example, in Excel cells A3..A47 could be selected.
  542.  
  543. Example
  544.  
  545. This macro gets the major and minor version numbers of GroupWise, which is already running.
  546.  
  547. dde_channel    0
  548.  
  549. get_vernumber    {INITIATE "GroupWise","Command",dde_channel}    
  550.  
  551.     {REQUEST dde_channel,"GetOfficeData(ID;MajorVersion!)",G1}
  552.  
  553.     {REQUEST dde_channel,"GetOfficeData(ID;MinorVersion!)",G2}
  554.  
  555.     {TERMINATE dde_channel}
  556.  
  557. This macro gets information from the fields Task and Completed in ObjectVision file TASKLIST.OVD and stores the data in the active notebook.
  558.  
  559. dde_channel    10
  560.  
  561. command    [@NEXT("TASKS")]
  562.  
  563. exec_result    0
  564.  
  565. vision_task    Print out third quarter report
  566.  
  567. task_complete    Yes
  568.  
  569. _get_vision_task    {INITIATE "VISION","TASKLIST.OVD",dde_channel}
  570.  
  571.     {REQUEST dde_channel,"Task",vision_task}
  572.  
  573.     {REQUEST dde_channel "Completed",task_complete}
  574.  
  575.     {EXECUTE dde_channel,+command,exec_result}
  576.  
  577. Parameters
  578.  
  579. DDEChannel    DDE channel number of the application to receive data from
  580.  
  581. DataToReceive    Information to receive from the application
  582.  
  583. DestBlock    Cells to store the data received into
  584.  
  585. {RESIZE}
  586.  
  587. Syntax
  588.  
  589. {RESIZE x,y,NewWidth,NewHeight,<VertFlip?>,<HorizFlip?>}
  590.  
  591. PerfectScript Syntax
  592.  
  593. Resize (x:Numeric; y:Numeric; NewWidth:Numeric; NewHeight:Numeric; [VertFlip?:Enumeration {Yes!; No!}]; [HorizFlip?:Enumeration {Yes!; No!}])
  594.  
  595. Description
  596.  
  597. {RESIZE} resizes all selected objects in the active window (dialog or chart window).
  598.  
  599. Parameters
  600.  
  601. x and y    XY coordinates of the new upper-left corner, in pixels
  602.  
  603. NewWidth    The new width, in pixels, of the object or group
  604.  
  605. NewHeight    The new height, in pixels, of the object or group
  606.  
  607. VertFlip?    1 if the object or group is flipped vertically from its previous position
  608.  
  609. HorizFlip?    1 if the object or group is flipped horizontally from its previous position
  610.  
  611. {ResizeToSame}
  612.  
  613. Description
  614.  
  615. {ResizeToSame} lets you resize selected objects in the dialog window to the same size as the first object selected.
  616.  
  617. {RESTART}
  618.  
  619. Description
  620.  
  621. {RESTART} changes the current subroutine to the starting routine (or the main routine) by removing all preceding For loops and subroutine calls.
  622.  
  623. {RESTART} is typically used for error handling. If an application is already nested to near the maximum number of levels and a severe error occurs that requires the macro to end, {RESTART} ensures that additional subroutine calls can be made. If you use the {RESTART} command often, you may want to use {BRANCH} to run subroutines.
  624.  
  625. {RestrictInput}
  626.  
  627. Syntax
  628.  
  629. {RestrictInput.Option}
  630.  
  631. PerfectScript Syntax
  632.  
  633. RestrictInput_Enter (Block:String)
  634.  
  635. RestrictInput_Exit ()
  636.  
  637. Description
  638.  
  639. {RestrictInput.Enter} enters INPUT mode and stays under macro control until {PAUSEMACRO} is used or {RestrictInput.Exit}, which exits INPUT mode.
  640.  
  641. {RestrictInput.Option} confines selector movement to specific cells of unprotected cells.
  642.  
  643. You can use {RestrictInput?} or {RestrictInput!} to display the Restrict Input dialog box. {RestrictInput?} lets you manipulate the dialog box, whereas {RestrictInput!} relies on the macro to manipulate it.
  644.  
  645. Options
  646.  
  647. {RestrictInput.Enter Block}    Enters INPUT mode and stays under macro control
  648.  
  649. {RestrictInput.Exit}    Any operation that ends INPUT mode
  650.  
  651. {RETURN}
  652.  
  653. Description
  654.  
  655. {RETURN} ends the executing subroutine and returns control to the macro that called it. If the macro executing is not a subroutine, execution stops.
  656.  
  657. A {RETURN} command at the end of a subroutine is optional, since a macro automatically returns from a subroutine when it reaches a blank cell or a cell containing a value. {RETURN} is usually used with {IF} to return to the main macro if a certain condition is met.
  658.  
  659. See {Subroutine} for an example of using {RETURN}.
  660.  
  661. {ReturnErrorValue}
  662.  
  663. Syntax
  664.  
  665. {ReturnErrorValue}
  666.  
  667. PerfectScript Syntax
  668.  
  669. ReturnErrorValue ()
  670.  
  671. Description
  672.  
  673. Reinstates the ability for Quattro Pro to return a specific error value, if one is warranted.
  674.  
  675. {RIGHT} and {R}
  676.  
  677. Syntax
  678.  
  679. {RIGHT <Number>} or {R <Number>)
  680.  
  681. Description
  682.  
  683. {RIGHT} and {R} are equivalent to the Right-arrow key. The optional argument Number moves the selector the corresponding number of columns to the right. You can also use cell references or cell names as arguments.
  684.  
  685. Example
  686.  
  687. {RIGHT}{RIGHT} moves right two columns.
  688.  
  689. {R 6} moves right six columns.
  690.  
  691. {RIGHT D9} moves right the number of columns specified in cell D9.
  692.  
  693. {RIGHT count} moves right the number of columns specified in the first cell of the selection named count.
  694.  
  695. Parameters
  696.  
  697. Number    Any positive integer (optional)
  698.  
  699. {ROWCOLSHOW}
  700.  
  701. Syntax
  702.  
  703. {ROWCOLSHOW Block,Show?,Row or Col,FirstPane?}
  704.  
  705. PerfectScript Syntax
  706.  
  707. RowColShow (Block:String; Show?:Enumeration {Yes!; No!}; Row?:Enumeration {Yes!; No!}; FirstPane?:Enumeration {Yes!; No!})
  708.  
  709. Description
  710.  
  711. {ROWCOLSHOW} lets you hide or reveal rows and columns (it is equivalent to the cell property Reveal/Hide). Show? specifies whether to reveal (1) or hide (0). Row or Col specifies whether to affect rows (1) or columns (0). Block contains the rows or columns to affect. FirstPane? is used when the active window is split into panes. To affect the columns or rows in the left or top pane, set FirstPane? to 1; to affect rows or columns in the right or bottom pane, set FirstPane? to 0.
  712.  
  713. Example
  714.  
  715. {ROWCOLSHOW A:A..B,1,0,1} reveals columns A and B on sheet A.
  716.  
  717. {ROWCOLSHOW A:1..7,0,1,1} hides rows 1 through 7 on sheet A.
  718.  
  719. {ROWCOLSHOW A:1..7,1,1,0} reveals rows 1 through 7 on sheet A. If the window is split, the rows are revealed in the right or bottom pane.
  720.  
  721. Parameters
  722.  
  723. Block    Cells containing rows or columns to hide or show
  724.  
  725. Show?    1 to reveal rows or columns; 0 to hide rows or columns
  726.  
  727. Row or Col    1 to reveal or hide a row; 0 to reveal or hide a column
  728.  
  729. FirstPane?    1 to affect rows or columns in left or top window pane; 0 to affect them in the right or bottom window pane
  730.  
  731. {ROWHEIGHT}
  732.  
  733. Syntax
  734.  
  735. {ROWHEIGHT Block,FirstPane?,Set/Reset,Size}
  736.  
  737. PerfectScript Syntax
  738.  
  739. RowHeight (Block:String; FirstPane?:Enumeration {Yes!; No!}; Reset?:Enumeration {Yes!; No!}; Size:Numeric)
  740.  
  741. Description
  742.  
  743. {ROWHEIGHT} provides two ways to change the height of a row or rows (it is equivalent to the cell property Row Height). The rows to change are specified by Block. FirstPane? is used when the active window is split into panes. To resize the rows in the left or top pane, set FirstPane? to 1; to resize the rows in the right or bottom pane, set FirstPane? to 0.
  744.  
  745. Set/Reset specifies how to change the height. To set a row height, use this syntax: {ROWHEIGHT Block, FirstPane?, 0, Size}
  746.  
  747. Size is the new row height, in twips. The maximum height is ten inches (14,400 twips).
  748.  
  749. To reset a row to the default height (determined by font sizes in the row), use this syntax: {ROWHEIGHT Block, FirstPane?, 1}
  750.  
  751. Example
  752.  
  753. {ROWHEIGHT A:1..A:2,1,0,1440} sets the height of rows 1 and 2 (on sheet A) to one inch (1,440 twips).
  754.  
  755. {ROWHEIGHT A:1..A:2,0,0,2160} sets the height of rows 1 and 2 (on sheet A) to one and a half inches (2,160 twips). If the window is split, the top or left pane is affected.
  756.  
  757. {ROWHEIGHT A:5,1,1} resets the height of row 5 (on sheet A) to the default height.
  758.  
  759. Parameters
  760.  
  761. Block    Cells containing rows to resize
  762.  
  763. FirstPane?    1 to resize rows in left or top window pane; 0 to resize rows in right or bottom window pane
  764.  
  765. Set/Reset    0 to set the row height; 1 to reset the row height
  766.  
  767. Size    New height (in twips) if setting size; not needed if resetting size
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.