dkinzer Site Admin
Joined: 03 Sep 2005
Location: Portland, OR
|
|
Posted: 22 August 2008, 2:15 AM Post subject: Re: Internal error: exception: access violation |
|
|
| pjc30943 wrote: | | "Internal error: exception: access violation" | With the simple test case below, I don't get an exception. I tried it on several versions of the compiler back to 2.4.3 with the same result. Can you reproduce the issue using this test case? | Code: |
Dim b as Byte
Sub Main()
b = findType(3)
End Sub
function findType(byval type as byte) as byte
findType = type
end function |
|
|
pjc30943
Joined: 02 Dec 2005
|
|
Posted: 22 August 2008, 20:21 PM Post subject: |
|
|
The code does not compile on my system, v. 2.5.5. It does not, in this case, give the exception, only the errors listed below. That exception still occurs when the function "findType(byval type as byte) as byte" is added into one of my modules.
However, the following does compile correctly.
| Code: | Dim b as Byte
Sub Main()
b = findType(3)
End Sub
function findType(byval type1 as byte) as byte
findType = type1
end function |
If "type" is used instead of "type1", the output is:
| Code: | testAccessError.bas:5: Error: function "findType" takes no parameters
testAccessError.bas:8: Error: expected '(' following function name
testAccessError.bas:9: Error: expected Sub, Function, Const, Declare, Dim or Enum
testAccessError.bas:10: Error: expected Sub, Function, Const, Declare, Dim or Enum |
|
|