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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Basic Loop
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ckeiderling

United Kingdom
2 Posts

Posted - 03/01/2014 :  8:23:51 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi new to this so any pointers welcome.

My loop does not work and I dont understand why:

loop (x,1,wks.ncols){wcol(x)=100-wcol(x);}

Castiel

343 Posts

Posted - 03/01/2014 :  10:09:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by ckeiderling

Hi new to this so any pointers welcome.

My loop does not work and I dont understand why:

loop (x,1,wks.ncols){wcol(x)=100-wcol(x);}





loop (x,1,wks.ncols){range rr=wcol(x); rr=100-rr;}


妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
Go to Top of Page

ckeiderling

United Kingdom
2 Posts

Posted - 03/02/2014 :  07:01:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, so basically you can't use wcol()=f(wcol()) inside a loop?

I managed to do this another way:

for(int ii = 2; ii < wks.ncols; ii ++)
{
wcol(ii)=100-wcol(ii);
}

but for some reason it only works when I format it with the new line each time.
Go to Top of Page

Castiel

343 Posts

Posted - 03/02/2014 :  08:29:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by ckeiderling

Thanks, so basically you can't use wcol()=f(wcol()) inside a loop?

I managed to do this another way:

for(int ii = 2; ii < wks.ncols; ii ++)
{
wcol(ii)=100-wcol(ii);
}

but for some reason it only works when I format it with the new line each time.



I think what really matters is the "x" in wcol(x)....

妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000