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
 deleting rows in specific datasets

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
blt2si Posted - 04/14/2003 : 09:33:55 AM
Hello All,

A very basic one I'm sure!
I used the intermediate string but now want to delete data out of the dataset before I copy it across. (see "Using $,% notation" question)
- Copy datasets from one worksheet to another.
- Delete the first 9 rows of the specific dataset only.
- Copy the remaining to the end of the another dataset.

This is the coding:
loop (ii,1,8)
{
%T=Interface!Filename.V$(ii)$;
%I=SS$(ii);
copy -x %T_ZW %A_%I;
mark -d %I -b 1 -e 9;
copy -a %A_%I %A_ZWalle;
};

However, using "mark -d" deletes rows 1 to 9 on every dataset in the worksheet. Do I need to specify the range of data that is to be deleted more clearly?

Thanks
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 04/15/2003 : 5:23:17 PM
The "name" in the command description refers to the dataset name. In your case the command should be written like this

get %A_%I -e rr; // rr is the last row displayed
rr=;
RR=120



Mike Buess
Origin WebRing Member
blt2si Posted - 04/15/2003 : 09:50:17 AM
With the data that that is analysed the number of rows often varies (from 11 < rr < 120).
How do you get the "end row number" in Labtalk?
In Origin C language it is simply "wks.GetNumRows" command
With Labtalk i look at possibly using:

get name option [variableName]
-e [variableName]
Get the end of the display range (the value of variableName equals the last index number)

So if "%R" was the end row (rr) and "%A_%I" was the dataset then:

get %R -e %A_%I;

But this does not work!
Do you have any suggestions?
Mike Buess Posted - 04/14/2003 : 10:28:59 AM
Hi Blank,

I'm afraid the mark command always deletes the entire row. However, you can use the copy command to move rows 10 through last to the beginning of the column. If col %I originally has rr rows you could use something like this...

rr2 = rr-9;
tmp = data(1,rr2); // create temporary dataset
copy -b 10 %A_%I tmp -b 1 -e rr2; // fill it with desired values
set %A_%I -e rr2; // truncate %A_%I
copy tmp %A_%I; // copy tmp to %A_%I
del tmp; // clean up

Mike Buess
Origin WebRing Member

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