[Gambas-devel] gambas editor added PrettyPrinter

Charlie karl.reinl at ...16...
Tue Jul 13 22:36:33 CEST 2004


Benoit Minisini schrieb:

>On Monday 12 July 2004 00:46, Charlie Reinl wrote:
>  
>
>>Salut,
>>
>>based on 0.94 (not 0.94a) I added to the gb.qt.editor a PrettyPrinter.
>>( editor.TabLength return a int now, I changed it for this version)
>>
>>I send you a gambas project (Indenter4-0.0.4.tar.gz) to test it and the
>>*.cpp and *.h files I changed (editor_new.tar.gz) ,  copy them to
>>/.../gambas-0.94/src/lib/qt/editor/ then compile/install it.
>>
>>The PrettyPrinter does not make the sourcecode only readable, he also
>>detects Errors .
>>When sourcecode loos his Structure a if/endif , for/next etc. is not closed
>>correctly.
>>
>>Please let me know what you think about.
>>
>>Amicalement
>>Charlie
>>PS: Try to post that mail since yesterday late night , and had problems
>>till now
>>    
>>
>
>When you have an optional parameter in a method implementation, you must not 
>do:
>
>	if (MISSING(bUseTab))
>		VARG(bUseTab) = TRUE;
>
>because you are modifying the interpreter stack, and this could be dangerous!
>
>You should use the macro VARGOPT instead:  VARGOPT(bUseTab, TRUE)
>
>Regards,
>
>  
>
Salut,

I do not understand well, what you say.
Means that instead:

	if (MISSING(bUseTab))
		VARG(bUseTab) = TRUE;

I can say :

	VARGOPT(bUseTab, TRUE);

or should '

	VARGOPT(bUseTab, TRUE);

replace the

	VARG(bUseTab) = TRUE;

Amicalement
Charlie







More information about the Devel mailing list