Bug with Blide or Blitzmax itself?

BlitzMax Forums/BlitzMax Programming/Bug with Blide or Blitzmax itself?

Xerra(Posted 2015) [#1]
Is there some kind of reason why when you use a block like:

REM
blah blah blah
END REM

in a file any include lines after it such as:

Include "name-of-file.bmx"

then the files will not be included so any functions referenced in the main file will just bug out with an error.

This was bugging me for ages last night trying to work out why my extra files were not being included when compiling until I removed the Rem / EndRem lines.

Note: I'm not sure if this happens in the default blitz editor or is just Blide that does this. Also I did have the Rem block folded but unsure if that makes a difference or not.


Derron(Posted 2015) [#2]
If it does not compile at all: it will be something regarding "bmx". If just the IDE blames something, then it might be their fault.

Can you give a small not compiling example? maybe there is something else stopping compilation.


EDIT: my testcode worked as intended:
include.bmx
REM
blah blah blah
END REM
Include "include2.bmx"


MyFunction()


include2.bmx
Function MyFunction:int()
	print "myfunction"
End Function


output
./bmk makeapp -t console -r -x "/testcodes/include.bmx"
Compiling:include.bmx
flat assembler  version 1.68  (32768 kilobytes memory)
3 passes, 2991 bytes.
Linking:include
Executing:include
myfunction




bye
Ron


Xerra(Posted 2015) [#3]
Did you try that with Blide or just in maxide, Ron?


Derron(Posted 2015) [#4]
In Geany ... because I explained above: if it fails to compile, it is a blitzmax compiler fault, if it is blamed by the ide, than it is an IDE fault.

I think it is up to you to press "compile" in your maxIDE which has the source code opened :-).


bye
Ron


Xerra(Posted 2015) [#5]
I'll check it again when I get home then as I didn't check the actual compile window to see a link.

I did give the include line a fake filename to see if it bombed out with no report so I guess the include line was ignored altogether.


Derron(Posted 2015) [#6]
Like said: post a not-compiling-example, maybe there is an invisible char breaking things, or an odd constellation of code.


bye
Ron


ziggy(Posted 2015) [#7]
You can also post a code example of the document, but I'm almost 99% sure it's not a BLIde thing, as it does nothing (other than highlighting) regarding comments and compilation. The documents are being sent to the compiler as plain text.


Xerra(Posted 2015) [#8]
Rather embarrassing that I can't replicate this now. Originally I had about 10 lines of notes that i'd used the ' char to comment out so I thought I'd switch to Rem / End Rem so I could fold them closed so the source code wasn't so lengthy to scroll through. Next time I loaded up the file in Blide the block was still closed and when I compiled it would not process the include file in the listing.

I use a system where I have two lines in a program like so:-

Include "Assets.bmx"
Include "IncBin.bmx"

One of these is always commented out so I can select if I want to compile the program and load in resources every time it runs from disk or comment out the other one if I wish to load the code that incbins all resources into a stand-alone executable. With the rem/end rem block it just ignored whichever include line I used so just crashed out every time I tried to use a resource that it hadn't found.

I went over the code for an hour or so trying to find out why it suddenly wasn't working that day and the only thing I recall doing before it kicked in properly was opening up the rem block to see if I had noted anything in there that I might have forgotten from the previous days work. Hence, this was why i assumed that area had been the problem.

Considering I've not been able to replicate it since, and I've been trying this morning, I'm going to have to assume I did something else to fix it and accept I actually have no idea what.

Apologies for the bug alert, chaps. I will update this post if it ever does crop up again :)