about indenting lines

calmar <[email protected]> Sat, 17 Dec 2005 09:56:19 +0100
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Hi all,

may I can ask, if my wild *guess* on the paragraph marked with ## is
true in some way?

I try to comment my second aap recipe, and wanted to add
something about 'indenting' in aap with providing a link to the
'Line Syntax' chapter, and that below:


# Indenting 'following' lines, is generally equivalent, as if you
# would write all on one line. It does not even matter 'how much'
# you indent - they can even be of a different amount - as long
# they are *more* indented compared to the _starting_ statement, 
# AAP treats them then as 'one line':
#
# var = bla     #the v in var is the _start_ indent level
#      bla2
#       bla3
#   bla4
#
# would work.
#
# In the same way, code blocks *should* be indented for the *same*
# amount, because if not, aap assumes, accordingly, the 'more'
# intended line belongs to the previous line.
#
## In the example below, aap expects some code blocks (after a
## :rule command. Aap scans for the 'at least', but still indented
## line, and expects the code block to be there. In the example
## below, it's the line 'tmpstring=..'. So you need to indent the
## files `%.part' and `htmlend.part' *more* that that line.
#
# ,----------------------------------------------------
# | #An ordered example:
# |
# | index_title = hier a title for the index page
# | pizzeria_oldtimer_title = title 2 bla bla
# |
# | :rule %.php : htmlbegin.part
# |               %.part
# |               htmlend.part
# |
# |         tmpstring= _no.$(match)_title
# |         @title = eval( tmpstring )
# |         :cat $source | :eval string.replace(stdin,
# |               '@TITLE@', title) >!  $(target)
# |
# | files = ./index.php
# |         ./pizzeria_oldtimer.php
# |         ./images/header.jpg
# |         ./favicon.ico
# `---
#
# ,----------------------------------------------------
# | # ugly, but still the same
# |
# | index_title = hier a
# |  title for 
# |        the index page
# | pizzeria_oldtimer_title = title 2 bla bla
# |
# | :rule %.php : htmlbegin.part
# |             %.part
# |           htmlend.part
# |
# |         tmpstring= _no.$(match)_title
# |         @title = eval( tmpstring )
# |         :cat $source | :eval string.replace(stdin,
# |                 '@TITLE@', title)
# |            >!
# |                       $(target)
# |
# | files = ./index.php
# |                     ./pizzeria_oldtimer.php
# |   ./images/header.jpg
# |     ./favicon.ico
# `---
#

thanks a lot,
marco

-- 
  calmar

          (o_  It rocks: LINUX + Command-Line-Interface
          //\
          V_/_                     http://www.calmar.ws


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click