Maximum Line Length!

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Maximum Line Length!

by bruce » Thu Oct 04, 2007 5:44 pm

Ice Cream Jonsey wrote:The fur-bearing trout is a HOAX... just like how Thanksgiving
You need to increase your line length there, buddy. You're truncated.

Bruce

by Ice Cream Jonsey » Wed Oct 03, 2007 10:36 pm

The fur-bearing trout is a HOAX... just like how Thanksgiving

by bruce » Wed Oct 03, 2007 10:10 pm

Vitriola wrote:But NEVER on Thanksgiving.
Why not? All the coats are on the bed.

Bruce

by Vitriola » Wed Oct 03, 2007 7:19 pm

But NEVER on Thanksgiving.

by bruce » Wed Oct 03, 2007 7:13 pm

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

by Ice Cream Jonsey » Wed Oct 03, 2007 5:18 pm

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: Select all

	/* 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.

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!

by Kent » Wed Oct 03, 2007 4:28 pm

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.

by Ice Cream Jonsey » Wed Oct 03, 2007 12:29 pm

Maybe I should just go in with a hex editor and change my copy of the compiler executable.

by bruce » Wed Oct 03, 2007 11:55 am

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

by pinbacker » Wed Oct 03, 2007 6:25 am

I don't...

...but I know someone who does!

That should at least make me comatose to you!

by Ice Cream Jonsey » Tue Oct 02, 2007 10:37 pm

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.

by pinbacker » Tue Oct 02, 2007 9:51 pm

sizeof(penis) == HUGE

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

by Ice Cream Jonsey » Tue Oct 02, 2007 9:18 pm

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.

by bruce » Tue Oct 02, 2007 8:14 pm

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

by Ice Cream Jonsey » Tue Oct 02, 2007 3:50 pm

Ahhh, I see from the source that it is built with Visual Studio .NET. Not 100% certain if I have that around or not.

by Ice Cream Jonsey » Tue Oct 02, 2007 3:47 pm

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.

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.

by Kent » Tue Oct 02, 2007 2:51 pm

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.

by Merk » Mon Oct 01, 2007 7:15 pm

Ooooooh. Hmmmm. That's one for Kent.

by Ice Cream Jonsey » Mon Oct 01, 2007 7:11 pm

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.

by pinbacker » Mon Oct 01, 2007 6:53 pm

Yeah, Jones, what the fuck are you talking about?

Top