rejetto forum

Macro changing?

rejetto · 46 · 9855

Poll

What markers do you prefer?

{.macro.} and {\quoting/}
1 (7.1%)
{:macro:} and {\quoting/}
4 (28.6%)
{\macro/} and {\\quoting//}
0 (0%)
{\macro/} and {/quoting\}
0 (0%)
{.macro.} and {:quoting:}
9 (64.3%)

Total Members Voted: 12

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13291
    • View Profile
I have my own thing in mind... [\macro/]

that would collide with sections syntax

Quote
If it HAS to have the {} then i prefer {\ /}

you mean {\macro|parameter/} ?
and what for quoting?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13291
    • View Profile
{{set|myvar|{{one macro|some parametters}} }}
{{set|mymacro|{{\ {{one macro|some parametters}} /}}  }}

Replaceable by
{{set var | myvar | {{one macro|some parametters}} }}
{{set macro | mymacro | {{one macro|some parametters}}  }} no dequote necessary but working as it   ( set is not necessary to define var and macro)

that can't be done with the current parser, because the parser knows nothing about the macros.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1934
    • View Profile
    • RAWR-Designs
well for qouting (which i've never used), we could just go... {\\ //}


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13291
    • View Profile
Why not use something as php
<?HFS  {set |myvar | SOME } {if|myvar| Ok for Me| why not?}  ?>

Quote from: rejetto
Because it's a longer syntax that would penalize quick usage.

i changed my mind. I'll see if i can easily adapt the parser to work in shorter way inside <?hfs ?> and in the longer way outside.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1934
    • View Profile
    • RAWR-Designs
<?hfs
if ($section = "section") {
   $section
} else {
   $section1
}
?>
orr
<?hfs
if {$section = section} {
   $section
} else {
   $section1
}
?>
orr
<?hfs
if $section = section {
   $section
} else {
   $section1
}
?>

If you could do something like that, it would be very pro. I have thought that it should be <?hfs ?> since the beginning. But i was worried about the speeds also.
« Last Edit: January 22, 2008, 08:59:44 AM by That_Stevens_Guy »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 1987
    • View Profile
I think that it is possible to work with the examples of TSG but two rule must be established well:

1)
Quote
<?hfs
if ($section = "section") {
   $section
} else {
   $section1
}
?>

The use of <?HFS ?>  has to return no result.

We have to declare specific variables to work correctly in this environment ($variable) or the other shape not to be confused with the existing

2) Creation of a macro specific to return one or several results to the order of execution (in the style of document.write)

$return  ...
or {{return result| ....}} 
 

****
In the final, we shall have an appearance of javascript but executed quoted to server


[quote]<?hfs
$return "begin of macro";
if ($section = "mysection") {
   $return {{section|$section}};
} else {
   $return {{section|$section1}};
}
$return "end of this 'macro' ";
?>
[/quote]


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1934
    • View Profile
    • RAWR-Designs
to return variables in php don't you just go... <?php print $variable; ?>  so... <?hfs print $section ?> <?hfs print !string ?> etc etc, and for others you would just echo your answer instead of print. I'm havent had much experience with php just what i've learnt from making our homepage.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13291
    • View Profile
you guys...!
the example was already in my post, and has nothing to do with yours.
the parser only knows 2 rules. {{macros}} and {{\quoting/}}
for a php-like thing there's a rule for the if, a rule for the while, a rule for the break, ...and so on for 200 times.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1934
    • View Profile
    • RAWR-Designs

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13291
    • View Profile
Lets vote!
you can suggest more options and i will add them.
You can change your mind and change your vote at any moment.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1934
    • View Profile
    • RAWR-Designs
{:m:} {\q/} that is confusing... there is no similarity between them and you can't see that a macro has been qouted. Same goes for {.m.} {\q/}. {\m/} {\\q//} is better.


Offline ELEVENNNN

  • Tireless poster
  • ****
    • Posts: 257
  • havent been here lately, still wont be here?
    • View Profile
Voted strictly on readability.  Soon I hope to learn some coding and be worth my vote :P

I agree with tsg though, that looks best for readability and to be seen in junks of code
This is going to take a long time
.................+...........................................
...................+.............+.................+.........
......................................


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 1987
    • View Profile
Tsg, I am sorry to oppose to you, but  {\m/} and {\\q//} are too similar to be acceptable.

I had proposed in rejetto a modification of the code to use {\\ double dequote //} as a replacement of  {{\{{\ dequote /}}/}} when it was necessary : REFUSED

I recognize the weight of your influence within the forum, but the fact of insisting (by several posts) on obtaining the syntax which is best convenient for you, does not very fair play .
 ;D
 


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1934
    • View Profile
    • RAWR-Designs
Well what about, {\macro/} {/quoting\} the opposite being a macro that will run later (thats how i see macro quoting).


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 1987
    • View Profile
What would be not bad it is that you are not the only one to be future evolutions, we would understand a little better the reasons of some of your posts