[Gambas-user] PP alignements in DIM

ron ronstk at ...239...
Sun Sep 19 18:53:22 CEST 2004


On Sunday 19 September 2004 16:58, Charlie Reinl wrote:
> Salut Ron,
> 
> send you attached the new alignements in DIM, one with option 
> NOT align after  'NEW' checked one without.
> 
> Thanks I forgot all the times INHERITS and PROPERTY 
> 
> Tell me what you think about.
> 
> Amicalement
> Charlie
> 

Hum, yummi yummi, that looks nice to me, I hope others to.
Geil, wie man da sagt im Deutschland. :)

I believe a table view with columns for the left part of 'AS' 
is good.  
The e3.jpg, upper picture, is for me the way I should most use
as standard, the second to check for errors I (don't) make. :) 

It can give a good insight of what you have declared.
However even if it is not wrong after 'AS' , it can make that part
a bit unreadable.

NEW is a optional keyword, If it occurs, it should have a column 
for it and lines without 'new' should have a empty cell.
4 Chars width, if I do not miss other Key words at that position.

Example 1:
a: b:  c:       d: 
AS NEW STRING[]
AS     INTEGER
AS     STRING   = "a nice great to charlie"

Example 2:
AS BOOLEAN 
AS NEW VARIANT
AS STRING = "a nice great to charlie"

Rule 1:
If a NEW exist then the all type shifts a column or one space after NEW
Rule 2:
if predefenied values then a new column after th widest type used.

Table like for checking can be handy but for readability I think not wise.
Not everyone likes a big width of the editor, me included.
Be carefull not to overdose it for the whole line.

One checkbox to handle the RightHandSide of AS can solve the
choise between Example 1 and 2.

BTW: The PROPERTY can't properly handled the same way
PROPERTY READ name(a as string,b as string, c as string) as integer wil not fit anyway
EVENT eventname(a as string,b as string, c as string)

I think it makes it not easy for you. You could do the global section
on a line by line base but these rules of indenting makes it more
difficult, I assume, for you.



Just dreaming, Benoit will kill me :)

{declare method}
    {variable_name} AS <NEW>
        {type_part} <= predefinied_value>

PRIVATE STATIC
    varName     AS <NEW>
        STRING  <= "predeclared">
    objObjects AS   
 Object[]
PUBLIC CONST <STATIC>
    pi         AS
        INTEGER = 3.14 
PROPERTY <READ>
    name(arg <, arg <, arg...>> ) AS
        VARIANT




More information about the User mailing list