Search found 96 matches

by skystrick
Oct 17, 2017 22:29
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

Re: LONGINT causing problems

Code execution should be faster by using cumulative addition instead of multiplication inside the loop: S = 0 DO S = S + Y IF S = X THEN REMAINDER = "NO": EXIT DO IF S > X THEN REMAINDER = "YES": EXIT DO LOOP Ha! That's what I get for coding stoned. Love your solution. Thanks fx...
by skystrick
Oct 17, 2017 21:56
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

Re: LONGINT causing problems

Without MOD, I need another way to determine whether Number X is evenly divisible by Number Y. Currently I test whether X MOD Y = 0 is true (if it is, there is no remainder for X DIV Y, thus it is evenly divisible). What is another way to do this without using MOD or DIV? I think I solved my own pr...
by skystrick
Oct 17, 2017 21:18
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

Re: LONGINT causing problems

may I suggest that you use QB64 instead of FB http://www.qb64.net or https://www.qb64.org forum http://www.qb64.net/forum/index.php I depend on several commands/features supported only by FreeBASIC (even in -lang qb). 20,000+ lines of code in my program would be a lot to rewrite. Without MOD, I nee...
by skystrick
Oct 17, 2017 19:42
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

Re: LONGINT causing problems

srvaldez wrote:if your code uses mod or division (have not tried the other operators) then there'a problem.



Nailed it!

I used MOD twice :)

Wait for a bugfix or is there a workaround for MOD in 64-bit lang QB?
by skystrick
Oct 17, 2017 19:30
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

Re: LONGINT causing problems

hello skystrick this code compiles and runs ok using FreeBASIC Compiler - Version 1.06.0 (02-04-2017), built for linux-x86_64 (64bit) #lang "qb" dim as __LONGINT x input "enter x ";x print sqr(x) print "enter return to exit " sleep Your code does compile and run withou...
by skystrick
Oct 17, 2017 18:32
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

Re: LONGINT causing problems

Hi, it looks like a bug with the -lang qb code generation on 64bit. I'm going to make a bug report. Thanks! Any suggestions for a workaround? Or just wait for a patch? EDIT: Maybe it has to do with the platform? I'm compiling under GNU/Linux 32bit. I'm compiling under Ubuntu Linux 64-bit using FBC ...
by skystrick
Oct 17, 2017 15:25
Forum: General
Topic: LONGINT causing problems
Replies: 18
Views: 372

LONGINT causing problems

Switched some variables in a program from INTEGER to __LONGINT (I am using -lang qb), now FBC compiler throws this error:

PROGRAM.o: In function 'main':
PROGRAM.c:(.text+0x2bdf3): undefined reference to '__moddi3'
PROGRAM.c:(.text+0x2be9e): undefined reference to '__moddi3'

Help?
by skystrick
Oct 13, 2017 19:02
Forum: Community Discussion
Topic: Thanks for FreeBASIC!
Replies: 10
Views: 475

Re: Thanks for FreeBASIC!

This is absolutely the most fun I've ever had coding!

Image
by skystrick
Oct 13, 2017 13:48
Forum: General
Topic: Preventing <Ctrl>+C possible?
Replies: 7
Views: 180

Preventing <Ctrl>+C possible?

Is there any way to disable <Ctrl>+C, <Ctrl>+Z, and <Ctrl>+Break in a FreeBASIC program? As in, prevent users from being able to quit the program?

If it matters I am running Linux.
by skystrick
Oct 10, 2017 13:59
Forum: Community Discussion
Topic: Thanks for FreeBASIC!
Replies: 10
Views: 475

Thanks for FreeBASIC!

I want to thank all the dudes who created FreeBASIC. I don't know your names, but I use your program every day and I love it! Microsoft QBASIC is the only programming language I know. Having FreeBASIC means I can run a modern OS in 2017 but still write code in QBASIC syntax. Thank you for making a L...
by skystrick
Oct 10, 2017 13:43
Forum: General
Topic: Can I use a library for this?
Replies: 30
Views: 438

Re: Can I use a library for this?

Maybe CLEARSCREEN needs to be a global variable (Dim Shared)? Currently it looks like it's not being shared between LOAD_EMULATION() and CLEAR_SCREEN(). The QB dialect allows this due to implicit variable declarations. Edit: Ah, already fixed in fxm's version. If you run your program under strace (...
by skystrick
Oct 10, 2017 13:41
Forum: General
Topic: Can I use a library for this?
Replies: 30
Views: 438

Re: Can I use a library for this?

It has probably nothing to do with it , just remember that black screen can occur if you run full screen and your PC does not support the color resolution that you use (I think that it was) , I had that problem once : https://www.freebasic.net/forum/viewtopic.php?f=6&t=25932 (Reason for suggest...
by skystrick
Oct 08, 2017 19:29
Forum: General
Topic: Can I use a library for this?
Replies: 30
Views: 438

Re: Can I use a library for this?

fxm wrote:Still, it works on my PC (correcting all syntax errors already signaled):


No, "Hello World" fails to print to the console.

The program simply SLEEPs until I press a key, then quits. Nothing is output to the screen.
by skystrick
Oct 08, 2017 18:50
Forum: General
Topic: Can I use a library for this?
Replies: 30
Views: 438

Re: Can I use a library for this?

mylib.bi: #inclib "mylib" DECLARE SUB LOAD_EMULATION (EMULATION AS STRING) DECLARE SUB CLEAR_SCREEN mylib.bas compiled with "fbc -lib mylib.bas": #LANG QB SUB LOAD_EMULATION (EMULATION AS STRING) IF EMULATION = "1" THEN CLEARSCREEN = CHR$(27) & "[H" & ...
by skystrick
Oct 08, 2017 18:47
Forum: General
Topic: Can I use a library for this?
Replies: 30
Views: 438

Re: Can I use a library for this?

PRINT "Hello World" and not PRINT 'Hello World' Thanks but you're not helping. That was for visual clarity in a forum post. Obviously PRINT statements use double quotes. Can anyone please help with my actual question: why does my program NOT execute the commands in the "mylib.bas&quo...

Go to advanced search