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
Enum and Function Compiler Error

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



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

Posted: 20 December 2006, 0:24 AM    Post subject: Enum and Function Compiler Error Reply with quote

Here is a reduced testcase that illustrates the problem
Code:
Sub Main()
   Dim rc as ErrorCodeEnum
    rc = Init()
End Sub

Public Enum ErrorCodeEnum
    ENOERR
End Enum   

Private ID as Byte

Public Function Init() as ErrorCodeEnum
   Init = ENOERR               
   ID = 0
End Function

The compiler (version 1.4 or 1.4.3) reports
Code:
Internal error: procedure.cpp(2027), Rev 739: unexpected return value type, "error_test.bas" line 14
Back to top
dkinzer
Site Admin


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

Posted: 20 December 2006, 0:55 AM    Post subject: Reply with quote

Thanks for providing the simple test case that illustrates the problem. The cause of the problem has been located and a solution identified. Further testing is required, however.
Back to top
mikep



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

Posted: 23 December 2006, 17:47 PM    Post subject: Reply with quote

dkinzer wrote:
Thanks for providing the simple test case that illustrates the problem. The cause of the problem has been located and a solution identified. Further testing is required, however.

I have worked around the problem for now by returning an integral value and then converting back to the enum on the caller side. I can try out the fix when you have it
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