This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Tuesday, August 5, 2008

[oopic] Re: Executable code outside of a subroutine

>
> At 01:18 AM 7/19/2007, Carson Hoyt wrote:
> > > ooPIC.Delay = 500
> > > Sub Main()
> > > ...
> > > End Sub

--- In oopic@yahoogroups.com, Andrew Porrett <slicerwizard@...> wrote:
> Executable code outside of a subroutine?
> A decent compiler would barf.
> ...Andy

Carson, Executable code outside of a subroutine, while not recognized
by some, is actually quite common.

Take the C language for example:

It will allow one to initialize a variable outside of code.

int a = 1;

In order to do this initialization, code has to
execute that assignment statement.

But what you are actually utilizing is a feature of the
Ver6 compiler where it can handle multiple syntax models.

And as much as I dislike it... the older GWBasic models will
in fact allow real code to be placed outside the code blocks. In
fact, the older GWBasic languages didn't even have code blocks.

Anyway, the Ver 6 compiler supports that syntax model, so it allows
it.

Scott Savage


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

No comments: