iffy
(Starting to like KiXtart)
2005-08-20 01:45 PM
new macro @TAB

Very minor but still... we've got @CRLF, can't we have @TAB too

LonkeroAdministrator
(KiX Master Guru)
2005-08-20 02:57 PM
Re: new macro @TAB

I vote against.

I accept that some ppl didn't remember in which sequence 10 and 13 was feeded to construct crlf and to some it was so hard to type the whole chr()+chr() thing.
so, it reasons somehow and @crlf was created.

@tab would be a macro of single character and would reduce the length of invoking it from 6 to 4 characters.
as a golf, that's a bad score.

anyways, I think not all want to know their ascii tables and thus I would not rip off my pants if this came to happen.
would just wonder a bit.


Chris S.
(MM club member)
2005-08-20 04:20 PM
Re: new macro @TAB

Here's a quick little UDF for you...

Code:

Function TAB
$TAB=CHR(9)
EndFunction



iffy
(Starting to like KiXtart)
2005-08-20 05:40 PM
Re: new macro @TAB

Haha, I know my ASCII chart very well, I dare say better then most here, probably comes from way to much assembly coding in the late 80's but since then I got lazy . But if @crlf is in I don't see the problem with building in this super mini thingy of @tab. On the other hand, quite a few macros can be "killed" since they are present as an environment variable or can be UDF'd in 1 or 2 lines of code. But, the 'vote' counts I guess...

ShawnAdministrator
(KiX Supporter)
2005-08-20 08:17 PM
Re: new macro @TAB

For what its worth, you have my vote iffy.

Mart
(KiX Supporter)
2005-08-20 10:42 PM
Re: new macro @TAB

You got my vote also.

LonkeroAdministrator
(KiX Master Guru)
2005-08-20 11:05 PM
Re: new macro @TAB

is it 3 to 2 now?

Mart
(KiX Supporter)
2005-08-21 10:26 PM
Re: new macro @TAB

Looks like it.
I've always learned that majority rules


LonkeroAdministrator
(KiX Master Guru)
2005-08-21 11:14 PM
Re: new macro @TAB

hmm...
I haven't.
strenght of individual is what I count on


Bryce
(KiX Supporter)
2005-08-22 06:12 AM
Re: new macro @TAB

having a feature just because we can, is not a good use of resources. I really see no need for this, since a chr(9) is just as easy to use.

It_took_my_meds
(Hey THIS is FUN)
2005-08-23 02:57 AM
Re: new macro @TAB

Perhaps I missing something, but I have never needed to use chr(9). I simply put a tab character in the string by pressing the tab button on my keyboard. This takes it down to 1 character; which is a hole-in-one in golfing terms.

ShawnAdministrator
(KiX Supporter)
2005-08-23 03:02 AM
Re: new macro @TAB

Quote:


I simply put a tab character in the string by pressing the tab button





roflmao ... good one ! Beat that Lonk.


iffy
(Starting to like KiXtart)
2005-08-23 08:18 AM
Re: new macro @TAB

I might need some time to come up with a witty reply on that one.

LonkeroAdministrator
(KiX Master Guru)
2005-08-23 09:14 AM
Re: new macro @TAB

hmm...
no need I think.
I actually am listening a song by DJ quicksilver.
I herd wrong the first words of the song: "Shave up your a**"
when she repeated them some seconds later, it really was "escape to an paraside"

anyway, I use tab character in my codes too.
but, inserting a tab is not just 1 character:
Code:

$stringwithoutTAB="text"
$stringwithTAB=$stringwithoutTAB+" "

;or:
$stringwithTAB=$stringwithoutTAB+chr(9)



as you can see, it actually is 4 characters.

I actually think this is where the macro would come handy.
instead of adding the tab to the string, with the macro it would be "easy" to embed it:
Code:

$stringwitTABs="text@tabthe B-column is here@taband@tabprettymuch@tabed...eh, golfed"



It_took_my_meds
(Hey THIS is FUN)
2005-08-23 09:24 AM
Re: new macro @TAB

No no with all due respect that is just plain wrong
You've just chosen to write it a long way

$stringwithoutTAB="text"
$stringwithTAB="text "

len($stringwithTAB)-len($stringwithTAB) = 1


LonkeroAdministrator
(KiX Master Guru)
2005-08-23 09:34 AM
Re: new macro @TAB

k, my variable names were misleading, fixing:
Code:

$stringwithoutTAB="text"
$THEsameStringWithTAB=$stringwithoutTAB+" "



if you can do here a nice presentation of how tab affects the data, you can't in real life situation.
in real life if you don't input the data yourself manually, it is given from somewhere and my example would be the way to add the tab to the text.


Sealeopard
(KiX Master)
2005-08-25 03:32 AM
Re: new macro @TAB

And of course we all use SETOPTION('NoMacrosInStrings','ON'), thus @TAB requires at least six charatcers including the concatenation, no real advantage.

LonkeroAdministrator
(KiX Master Guru)
2005-08-25 02:12 PM
Re: new macro @TAB

ja, thanks jens.
your wisdom is always welcome