by Ice Cream Jonsey » Tue Sep 20, 2011 12:29 pm
Tdarcos wrote:I notice one immediately glaring omission in the Hugo programming language. Include files.
Apparently you can't break up a hugo source into multiple source files and then include them. Even Turbo Pascal version 3 supported this, and I find the omission strange.
No, you can. I ended up with this for my last game:
Code: Select all
#include "verblib.g" ! grammar must come first
#include "hugolib.h" ! standard library routines
#include "contain.h"
#include "system.h"
#include "window.h"
#include "resource.h"
#include "cango.h"
#include "config.hug"
#include "jObjects.hug"
#include "jSceneryLibrary.hug"
#include "jScenery.hug"
#include "jPluralClass.hug"
#include "jVats.hug"
#include "jDaemons.hug"
#include "jIdleDaemons.hug"
#include "jTwinDaemon.hug"
Some of those I made myself and some of those I grabbed from other sources.
This SHELL.HUG file is what a lot of people use to get started. There's an example of including libraries in it:
http://ifarchive.heanet.ie/if-archive/p ... /shell.hug
We will help you with all our might, Commander!
[quote="Tdarcos"]I notice one immediately glaring omission in the Hugo programming language. Include files.
Apparently you can't break up a hugo source into multiple source files and then include them. Even Turbo Pascal version 3 supported this, and I find the omission strange.[/quote]
No, you can. I ended up with this for my last game:
[code]#include "verblib.g" ! grammar must come first
#include "hugolib.h" ! standard library routines
#include "contain.h"
#include "system.h"
#include "window.h"
#include "resource.h"
#include "cango.h"
#include "config.hug"
#include "jObjects.hug"
#include "jSceneryLibrary.hug"
#include "jScenery.hug"
#include "jPluralClass.hug"
#include "jVats.hug"
#include "jDaemons.hug"
#include "jIdleDaemons.hug"
#include "jTwinDaemon.hug"[/code]
Some of those I made myself and some of those I grabbed from other sources.
This SHELL.HUG file is what a lot of people use to get started. There's an example of including libraries in it:
http://ifarchive.heanet.ie/if-archive/programming/hugo/examples/shell.hug
[i]We will help you with all our might, Commander![/i]