While compiling the core, I'm getting a ' Nested function definition' error. I have no clue why.
Code is as following:
<code>SUB ctrlaltdel
...
END SUB
</code>
The declare is in a main file called LIBRARY.QH and in there everything is declared like it should.
<code>DECLARE SUB ctrlaltdel ()
</code>
Can someone help me out here?
grtz
Seb
Nested function definition
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Nested function definition
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
Re: Nested function definition
I had never heard of "nested function definition", but found that it is valid in other languages.Seb McClouth wrote:While compiling the core, I'm getting a ' Nested function definition' error. I have no clue why.......
Perhaps the Function or SUB immediately before the Sub in question, did not terminate correctly with an End Function or End Sub. Sometimes we forget and use Exit Sub or Exit Function instead.
Another possibility is that the Sub in question is the first Sub after the main module. I have seen recommendations that say to terminate the main modile with an END before placing your Subs and Functions. As a result, I always do this. However I have seen programs that do not use this rule.
I couldn't find this error message in my QuickBasic manual. Sorry that I don't have anything more definitive.
Regards..... Moneo
*****
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
THx I'll check... btw does it apply to PDS as well your manual?
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Moneo, you were right. I did forget an END SUB in the sub before.
tHX
tHX
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
- Seb McClouth
- Veteran
- Posts: 342
- Joined: Wed Nov 09, 2005 7:47 am
- Location: Inside the Matrix...
- Contact:
Well, I wouldn't have found it, without your help.
I don't have any manual, just some old on a TRS-80... that covers... erm... no a GW-Basic as well...
grtz
I don't have any manual, just some old on a TRS-80... that covers... erm... no a GW-Basic as well...
grtz
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.