[Gambas-user] Unix Date conversion

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Sat Jul 29 17:42:59 CEST 2006



Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>


> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net
> [mailto:gambas-user-bounces at lists.sourceforge.net]On Behalf Of Benoit
> Minisini
> Sent: Friday, 28 July 2006 17:03
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] Unix Date conversion
>
>
> On Wednesday 26 July 2006 07:48, Timothy Marshal-Nichols wrote:
> >
> > 1. You may have a constructor and destructor in the object and want to
> > control when they are executed. Or even if the are executed - say if the
> > object was just used on one form that is a dialog. This is even
> more true
> > if your object calls on resources outside of Gambas.
>
> In Gambas, a class has an initializer function named "_init", and
> its contrary
> named "_exit".


But "_exit" does not appear to *ever* get called. If you add:

	STATIC PUBLIC SUB _exit()
		PRINT "Static Destructor"
	END

to a class you never see the text printed! So how can you use this method?

(Slipped of the subject of UNIX data a bit.)

>
> If you really need "singletons", i.e. class that you instanciate
> only once,
> the keyword "CREATE" tells Gambas that the class can create an hidden
> instance when the class name is used like an object reference.
>
> >
> > 2. Good programming languages 'encourage good programming
> practice' rather
> > than force the ideas the language developer on the language user. There
> > should be no penalty for using the language in a way not intended by the
> > language developer.
>
> There is no penalty in making a useless dynamic class just for
> using dynamic
> methods instead of static ones, except the memory taken by the single
> instance needed to call the methods.
>
> > This is why C and C++ have always been more popular
> > then Pascal. Both the C and Pascal languages were developed by
> people who
> > were influenced by the ideas of structured programming that
> were around at
> > the time. Both wanted to get away from the GOTO style of programming of
> > languages like COBOL. C took the first approach. C rewarded you for good
> > programming practice - Pascal forced you. This is one reason why you use
> > C/C++ to develop Gambas and not Pascal!
> >
>
> I use C/C++ because they are the language to use when developing
> interpreters
> and using libraries on Linux.
>
> And the big problem with Pascal is that you have to type many
> boring keywords
> and ';' to do simple things :-)
>
> Regards,
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>






More information about the User mailing list