The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Col(colNum)[rowNum] change

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
CStorey Posted - 01/05/2001 : 1:39:37 PM
Comments on Patch #1 Origin 6.1

Comment #1
The function wksName!col(colNum)[rowNum] has changed to wksName!cell(rowNum, colNum).

I would like to know why such a major change was made.
I like the fact that the notation is significantly better, but now I must upgrade all my scripts to reflect this change if I use Patch #1.

Comment #2
I would also like to know why the Help files are not update with each consecutive patch!!
It is not to much to ask for that the Help files reflect the script language.
Please in the future include the udates in the Patches.

Craig Storey

3   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 01/08/2001 : 3:08:04 PM
The release note for 6.1 Patch 1 was correct in saying

Instead of referencing a cell using the wksName!col(colNum)[rowNum] notation, use the wksName!cell(rowNum,colNum) notation.
but should have been clearer by saying that the first notation is wrong. It is not documented as working - only as an example of what not to do. Sorry for the confusion.
The col( ) and wcol( ) functions have not changed at all and both are restricted to the active worksheet.
CStorey Posted - 01/08/2001 : 11:52:06 AM
Thanks for the quick answer Greg. I was a little annoyed to learn that my scripts where all in need of upgrade if I installed the patch to take advantage of the improvements.

In my first post I refered to wksName!col()[] and wksName!cell(,). In the release notes titled "Patch 1 for English Origin 6.1", under the LabTalk section please see entry #2. Is it in error? I copied the two commands directly from that release note.

I have never actually used wksName!col()[], only col()[], but simply assumed that it worked given that it was documented in the release notes. Now I'm confused.

Does col()[] still work if referencing the active worksheet or should I begin making changes to wksName!cell(,)?? Has the col()[] function changed at all??

Your answer will be greatly appreciated.
Craig

greg Posted - 01/05/2001 : 6:14:47 PM
I think you are confusing two issues.

The col( ) function never supported the use of WindowName! as a prefix. That notation was reserved for object properties, however the cell( ) function was written to allow that notation. If you have written scripts using
wksName!col(colNum)[rowNum] then they only worked correctly (by accident) when the worksheet named wksName was the active window. For example, if you had Data1 and Data2 windows and Data2 was the active window, then
nn=Data1!col(2)[1]

would actually return the value from column 2 of row 1 of Data2 (the active window) - not from Data1.

There are changes in the behavior of the cell( ) function between 6.1 and 6.1 SR1. Although I know it's of no comfort to you now, I argued against this change. What changed was the order of the arguments:
VersionSyntax
6.1[wksName!]cell(colNum, rowNum)
6.1 SR1[wksName!]cell(rowNum, colNum)

If you really have been using wksName!col(colNum)[rowNum] then a re-write of your code is necessary no matter what version you use. If you are using wksName!cell(colNum, rowNum) in 6.1, then you will (unfortunately) have to re-write the code to be compatible with 6.1 SR1 (and later). For example:


if(system.version<6.1073) nn=wksName!cell(myCol, myRow); else nn=wksName!cell(myRow, myCol);



Your suggestion that we re-compile the Help files is a good one. I will pass it along to Documentation. We have been relying on release notes and our web site to provide the latest information.




Edited by - greg on 01/05/2001 18:15:29

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000