Tag Archives: pointers

First steps: Frotz in Eclipse

I’ve looked at a lot of the Frotz source code. It’s undeniably simple and yet, it’s a big challenge for me. First of all, it is a virtual machine, no matter how you want to put it. Second, it’s not really that well commented. I’m still pretty enthusiastic about the whole thing. One aspect I had actually completely overlooked is how this project is getting me much close to Eclipse.

Eclipse

Eclipse logo

Eclipse is a very popular Java-based IDE, or Integrated Development Environment. Originally made for Java, it has been adapted for most languages one could reasonably expect it to work with, including of course C and C++. The needs of this project and the time constraints encourage me to use Eclipse and to use it in a more efficient way I have so far.

I’m using it to find out where variables and functions have been declared automatically, for example. It has more than one feature that help with that.

Real-life code

Frotz is definitely real-life code. I’m not in a world of textbooks anymore. This is an example of a comment I found:

For a very different example, I found this nifty piece of code that takes a full filepath and only keeps the basename:

This uses pointers and the fact that in C, there are no strings but zero-terminated character arrays. I actually like seeing a real-life example of this sort of thing.

To be continued.