FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Maximum Line Length!
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Mon Oct 01, 2007 9:35 am    Post subject: Maximum Line Length! Reply with quote

SAY, just to confirm, there is no way to increase the maximum line length in Hugo, is there? I have an array filled with character objects and like 80 characters. So putting them in that array has me running out of space. I guess I could change their names from, "TheBeastofTandorHill" to "BTH1" and such, which is the way I'm handling it now. But I am curious if this is a variable I can set, like MAXROUTINES.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Mon Oct 01, 2007 6:50 pm    Post subject: Reply with quote

The length of the input line? I'm not sure which line you mean.
Back to top
View user's profile Send private message Visit poster's website
pinbacker



Joined: 23 Jul 2007
Posts: 317
Location: The Sun!

PostPosted: Mon Oct 01, 2007 6:53 pm    Post subject: Reply with quote

Yeah, Jones, what the fuck are you talking about?
_________________
That's the wrong video, by the way.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Mon Oct 01, 2007 7:11 pm    Post subject: Reply with quote

Merk wrote:
The length of the input line? I'm not sure which line you mean.


Oh - I mean the line as in any given line in the source code.

For instance, you seem to get about a thousand characters. You can wrap it using \ (or is it the "/" character, I can never remember) but eventually you come across the limit of how many characters can exist in one Hugo expression.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Merk



Joined: 22 Nov 2004
Posts: 192
Location: Wichita, KS

PostPosted: Mon Oct 01, 2007 7:15 pm    Post subject: Reply with quote

Ooooooh. Hmmmm. That's one for Kent.
Back to top
View user's profile Send private message Visit poster's website
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Tue Oct 02, 2007 2:51 pm    Post subject: Reply with quote

If I understand you correctly and recall the compiler source (without actually, you know, looking at it), I think there's a 1024-character input buffer used for reading source code line-by-line, and it'll bark at you if you go beyond that.

I'm not sure exactly what you're up to. Is there a way to work around this? It's certainly possible source-code wise to push that limit up, seeing as it's basically been around since the beginning, and machines have things like lots of memory now.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Tue Oct 02, 2007 3:47 pm    Post subject: Reply with quote

Kent wrote:
If I understand you correctly and recall the compiler source (without actually, you know, looking at it), I think there's a 1024-character input buffer used for reading source code line-by-line, and it'll bark at you if you go beyond that.


Ah, right right - 1024 would be what I encountered.


Quote:
I'm not sure exactly what you're up to. Is there a way to work around this? It's certainly possible source-code wise to push that limit up, seeing as it's basically been around since the beginning, and machines have things like lots of memory now.


When you say source code, do you mean mine or the Hugo compiler's source? I just did a scan on the Hugo source for 1024 and the following line comes up:

if (list_buffer = malloc(1024*sizeof(char)))

If that's what I'd need to change, I think I could recompile the source and then use that to compile my WIP. But if it's just a matter of changing something like MAXLINELENGTH in my game's source code, I can of course do that as well (I just don't know what the variable name is) (for instance, it's MAXROUTINES to change the maximum number of routines).

As for the specific example, I'm just making an array of objects. Like:

array[80] = "VernonWells", "AlexRios", "TroyGlaus" and so forth. I already give each object a "character identification number" so I could just use that instead of their names. Or make their object names something like VW and AR and TG, I suppose.

If the constraint is in the Hugo compiler and you happen to remember off the top of your head where it is set, I'll change it and recompile hc.exe and see what happens. It would definitely be convenient to have longer line lengths.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Tue Oct 02, 2007 3:50 pm    Post subject: Reply with quote

Ahhh, I see from the source that it is built with Visual Studio .NET. Not 100% certain if I have that around or not.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
bruce



Joined: 04 Jun 2002
Posts: 2547

PostPosted: Tue Oct 02, 2007 8:14 pm    Post subject: Reply with quote

Also, if Visual Studio .NET is a C compiler--and I don't know that it is, maybe it's C# or something--is it?--anyway, sizeof(char) is 1 by definition in C.

Bruce
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Tue Oct 02, 2007 9:18 pm    Post subject: Reply with quote

bruce wrote:
Also, if Visual Studio .NET is a C compiler--and I don't know that it is, maybe it's C# or something--is it?--anyway, sizeof(char) is 1 by definition in C.

Bruce


That would lead me to believe that I did in fact find the right line.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
pinbacker



Joined: 23 Jul 2007
Posts: 317
Location: The Sun!

PostPosted: Tue Oct 02, 2007 9:51 pm    Post subject: Reply with quote

sizeof(penis) == HUGE

ha ha i'm like bruce and knuckles except dumber than one and smarter than tha other
_________________
That's the wrong video, by the way.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Tue Oct 02, 2007 10:37 pm    Post subject: Reply with quote

pinbacker wrote:
sizeof(penis) == HUGE

ha ha i'm like bruce and knuckles except dumber than one and smarter than tha other


Do you have a .NET compiler on one of your computers? If not you're dead to me and it's over.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
pinbacker



Joined: 23 Jul 2007
Posts: 317
Location: The Sun!

PostPosted: Wed Oct 03, 2007 6:25 am    Post subject: Reply with quote

I don't...

...but I know someone who does!

That should at least make me comatose to you!
_________________
That's the wrong video, by the way.
Back to top
View user's profile Send private message
bruce



Joined: 04 Jun 2002
Posts: 2547

PostPosted: Wed Oct 03, 2007 11:55 am    Post subject: Reply with quote

pinbacker wrote:
I don't...
...but I know someone who does!
That should at least make me comatose to you!


It's like talking to Zippy the Pinhead.

Can't you get the Express Edition of the Visual Studio tools for free, just by downloading them from Microsoft?

Bruce
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Wed Oct 03, 2007 12:29 pm    Post subject: Reply with quote

Maybe I should just go in with a hex editor and change my copy of the compiler executable.
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Wed Oct 03, 2007 4:28 pm    Post subject: Reply with quote

I hard-coded that as "1024"? Excellent work. There should be a MAXBUFFER #define in hcheader.h. Since I didn't use that for that allocation, I'll have to look at it in more detail to be sure what, exactly, I was doing.

The other thing you should be able to do in the meantime is, in multiple lines:

MyArray[0] = "A", "B", "C"

MyArray[3] = "D", "E", "F"

MyArray[6] = "G", "H", "I"

and so on.

The Hugo compiler is pretty digestible C. For the Win32 version, the Windows-specific stuff (hcwin.h) uses MS extensions for path-splitting and whatnot. The 32-bit DOS version is compiled with gcc. But if your only compiler is MS QuickC, luckily the 16-bit DOS source has your name on it.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Wed Oct 03, 2007 5:18 pm    Post subject: Reply with quote

Kent wrote:
I hard-coded that as "1024"? Excellent work. There should be a MAXBUFFER #define in hcheader.h. Since I didn't use that for that allocation, I'll have to look at it in more detail to be sure what, exactly, I was doing.


Ah, no prob. Taking a look, I do see MAXBUFFER in use. My scan just now did not seem to show me where it was defined, so it is possible/probable that I missed it.

And it warrants mentioning that I still like Hugo very, very much and see myself using it in the future because it's just so awesome. I know you know that the stuff Merk and I are finding are corner case things, uncovered because we're both entering our second half-decade of getting good at the language. But I feel bad only really posting to this base when I find something behaving a little odd.

Not related to any of that, I saw this in the source right now:

Code:
   /* Hugo circa v2.2 allowed '^' and '~' for '\n' and '\"',
      respectively
   */


I didn't know that. I'm glad it doesn't allow it these days. That always bugged me about Inform.


Quote:

The other thing you should be able to do in the meantime is, in multiple lines:

MyArray[0] = "A", "B", "C"

MyArray[3] = "D", "E", "F"

MyArray[6] = "G", "H", "I"

and so on.


Ah! That would seem to also solve the issue. The "furBearingTrout" object is back in business, baby!
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
bruce



Joined: 04 Jun 2002
Posts: 2547

PostPosted: Wed Oct 03, 2007 7:13 pm    Post subject: Reply with quote

Ice Cream Jonsey wrote:
The "furBearingTrout" object is back in business, baby!


That sounds dirty. Maybe Vitriola should cut down on your Viagra/Cialis/Prozac ration.

Bruce
Back to top
View user's profile Send private message
Vitriola



Joined: 10 Mar 2003
Posts: 2426

PostPosted: Wed Oct 03, 2007 7:19 pm    Post subject: Reply with quote

But NEVER on Thanksgiving.
_________________
Surprisingly, the buildings that processed the uranium for the bombs are rather nondescript square gray structures.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
bruce



Joined: 04 Jun 2002
Posts: 2547

PostPosted: Wed Oct 03, 2007 10:10 pm    Post subject: Reply with quote

Vitriola wrote:
But NEVER on Thanksgiving.


Why not? All the coats are on the bed.

Bruce
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended