Page 1 of 1 1
Topic Options
#146013 - 2005-08-20 01:45 PM new macro @TAB
iffy Offline
Starting to like KiXtart

Registered: 2005-05-29
Posts: 149
Loc: The Netherlands
Very minor but still... we've got @CRLF, can't we have @TAB too

Edited by iffy (2005-08-20 01:45 PM)

Top
#146014 - 2005-08-20 02:57 PM Re: new macro @TAB
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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.
_________________________
!

download KiXnet

Top
#146015 - 2005-08-20 04:20 PM Re: new macro @TAB
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Here's a quick little UDF for you...

Code:

Function TAB
$TAB=CHR(9)
EndFunction


Top
#146016 - 2005-08-20 05:40 PM Re: new macro @TAB
iffy Offline
Starting to like KiXtart

Registered: 2005-05-29
Posts: 149
Loc: The Netherlands
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...
Top
#146017 - 2005-08-20 08:17 PM Re: new macro @TAB
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
For what its worth, you have my vote iffy.
Top
#146018 - 2005-08-20 10:42 PM Re: new macro @TAB
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
You got my vote also.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#146019 - 2005-08-20 11:05 PM Re: new macro @TAB
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
is it 3 to 2 now?
_________________________
!

download KiXnet

Top
#146020 - 2005-08-21 10:26 PM Re: new macro @TAB
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Looks like it.
I've always learned that majority rules
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#146021 - 2005-08-21 11:14 PM Re: new macro @TAB
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
I haven't.
strenght of individual is what I count on
_________________________
!

download KiXnet

Top
#146022 - 2005-08-22 06:12 AM Re: new macro @TAB
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
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.
Top
#146023 - 2005-08-23 02:57 AM Re: new macro @TAB
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
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.
Top
#146024 - 2005-08-23 03:02 AM Re: new macro @TAB
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Quote:


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





roflmao ... good one ! Beat that Lonk.

Top
#146025 - 2005-08-23 08:18 AM Re: new macro @TAB
iffy Offline
Starting to like KiXtart

Registered: 2005-05-29
Posts: 149
Loc: The Netherlands
I might need some time to come up with a witty reply on that one.
Top
#146026 - 2005-08-23 09:14 AM Re: new macro @TAB
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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"

_________________________
!

download KiXnet

Top
#146027 - 2005-08-23 09:24 AM Re: new macro @TAB
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
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

Top
#146028 - 2005-08-23 09:34 AM Re: new macro @TAB
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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.
_________________________
!

download KiXnet

Top
#146029 - 2005-08-25 03:32 AM Re: new macro @TAB
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
And of course we all use SETOPTION('NoMacrosInStrings','ON'), thus @TAB requires at least six charatcers including the concatenation, no real advantage.
_________________________
There are two types of vessels, submarines and targets.

Top
#146030 - 2005-08-25 02:12 PM Re: new macro @TAB
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja, thanks jens.
your wisdom is always welcome
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.07 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org