On 5/13/2011 3:56:01 AM, Christian Ziemski wrote:
>On 5/4/2011 10:54:09 PM, somwhere else
>Peter Rejto wrote:
>>
>>I also would like to perform the magic
>>of converting rows into columns. Could
>>you please give me a more detailed set
>>of instructions ?
>
>Peter:
>
>Just for fun I wrote a macro
>"transpose.vdm" (attached).
>
>Please note: It is a demo/study only!
>
>In theory it can handle CSV tables up to
>80 columns,
>but then there need to be added some
>code to save buffer 2 (used to build the
>resulting table) to a file.
Thanks Christian,
After downloading your "transpose.vdm", I was surprised to find my own experimental macro. Here it is :
// TRANSPOSE.VDM
// Experimental Macro; Correctly gives the transpose of a comma delimited block which is on a single line/raw.
// Based on a suggestion of Pauli Lindgren.
Replace_Block("|H2C","|N", BB, BE, ALL)
Return()
Note that it is a special case only !
I have just searched this webboard for "transpose" and learned that the Pauli reference is to his Sort_Merge()-algorithm thread, in the Other General, etc conference. Specifically to webboard.vedit.com/read?63074,42.
Essentially, there he replaces the comma delimiter with |N, the newline character.
So, I tried to restrict your macro to the case of block consisting of a single raw. I take it should give something simple. But, I could not figure out what it is. Could you help me ?
Now I have another, open ended, question:
Since I have forgotten about my experimental macro, I did put my cursor on the Replace_Block command. Then I invoked the "Command at Cursor" menu command. First I did this in my
my (almost) recent Vedit 6.20.0 version. Here I only got some very very general information. Second I did this experiment in Vedit 6.15.4. Bingo, here I got something really specific.
In short, so far as the "Command at Cursor" menu command is concerned, I do prefer the 6.15.4 help system to the new 6.20.0 help system. Possibly this is due to the fact that I have not gotten used to the new help system ?
I am looking forward to learning the reaction of other Vedit users.
-peter
|
|