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
 Column long and short names

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
kfauth Posted - 06/28/2016 : 03:44:26 AM
Origin Ver. and Service Release (Select Help-->About Origin): Pro 2015G Sr2
Operating System: Win7Pro

Hello again,

I run into the problem of needing column names longer than the allowed 13 characters to be descriptive (not so much to the user but to other scripts which try to find a column based on a number of parameters).

I understand that the long names may serve this purpose. Since these would need to be recognized from script, it would be necessary to retrieve the column short name from the long name. Is there a function serving this purpose?

In general, the script looking for that column cannot know aforehand whether the desired column exists, is it possible to check the existence of a column by its long name?

Thanks for any help.
3   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 06/30/2016 : 09:31:27 AM
Hi Kai,

> Should I open a separate post in that forum for this purpose?

Yes, please.

--Hideo
kfauth Posted - 06/29/2016 : 5:07:59 PM
Dear Hideo Fujii,

thank you for this useful answer. Of course, uniqueness of long names would reside in the responsability of the coder/user.

I do have the same question in the context of OriginC. Should I open a separate post in that forum for this purpose?

Thanks again
Kai
Hideo Fujii Posted - 06/28/2016 : 12:11:10 PM
Hi kfauth,

You can access the short name or the column number via the universal identifier (UID). See the following sample:
(Suppose "cc" is the long name of the third column, C)
int nColUID = range2uid(col("cc")); 
range cuid = uid2range(nColUID)$;
string cname$=uid2Name(nColUID)$; 
cuid.name$=; //short name
cuid.LNAME$=; //long name
cuid.INDEX=; //column index
cname$=;
exist(cname$)=;  //test of the dataset

> C
> cc
> cuid.INDEX=3
> Book1_C
> exist(cname$)=1 //1: existing dataset

Keep in mind that the long name doesn't have to be unique in the worksheet.

Hope this answers to your question.

--Hideo Fujii
OriginLab

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