Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
ZBasic, Modules 101

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 15 November 2006, 6:50 AM    Post subject: ZBasic, Modules 101 Reply with quote

What am I doing wrong here:

A.bas - contains
public foo1()
public var1 as byte
-------------------------------------

B.bas contains all this code
private b as byte

private foo2()
b = A.var1 ' works as you'd think, and is clearer, but
b = var1 ' is the same since the scope of var1 is "entire project"

call foo1() ' works as above
call A.foo1() ' yields a compiler error. The A. helps show what module this is in
end sub
--------------------------------------

As I read the manuals, call A.foo1() is permitted.
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 15 November 2006, 7:56 AM    Post subject: Re: ZBasic, Modules 101 Reply with quote

stevech wrote:
What am I doing wrong here:
Nothing, it looks like a compiler bug.

In my latest multi-module project (15 modules) I always use just the name without the scope prefix and I avoid name clashes. But I tried your example and got the same error with 1.4 version of the compiler.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 15 November 2006, 20:01 PM    Post subject: Re: ZBasic, Modules 101 Reply with quote

stevech wrote:
As I read the manuals, call A.foo1() is permitted.

You are correct; it should be. The cause of the problem, which also affects CallTask, has been determined and a solution has been implemented. Complete testing is yet to be done.
Back to top
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 15 November 2006, 20:35 PM    Post subject: Reply with quote

One software project I worked on had a design review process. For each design/coding error (aka bug) that was found during development/test, the author had to throw a quarter in the bug jar. Unfortunately, we had quite a few lunches from that jar!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group