Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
difference usage between qb4.5 and freebasic
#1
for information i am French : Good or bad things Smile

I use Qb45 since many years ago
with xp, it's not possible to use a program 16 bits, too slow etc etc

i try this day Freebasic with fbide -(yes i know, i have many (years) late

my ask :

It's possible when the programm terminat, no close the run window (maybe on a run command), use sleep on bottom programm it's not a good solution

It's Possible to add an qb library like Altquick.LIB and Altquick.QLB to FREEBASIC for conserve compatibility with old .bas. I use some fonction from.

iit's possible to have a similar routine on Freebasic

revinput$ (max, visible, dAult$, legal$, ctx, topic$, mask, hotkey)

from altquick.lib on quickbasic 4.5

On the QB interpreter, we can use F6 to type (for example) Print variable to see its content >> print a$ and type AAz (why not)

i am not familiar with all this library join.

:nerd:
ld QuickBasic
maybe New on Freebasic
Reply
#2
"It's possible when the programm terminat, no close the run window (maybe on a run command), use sleep on bottom programm it's not a good solution"

that is the job of the IDE, not the compiler.. sorry.


"On the QB interpreter, we can use F6 to type (for example) Print variable to see its content >> print a$ and type AAz (why not)"

there is no FB interpreter. you can use GDB to achieve this effect.


"revinput$ (max, visible, dAult$, legal$, ctx, topic$, mask, hotkey)"

No idea what this function does ;P


btw, FB isn't "years" old ;], it is less than 1.5 years old, actually.
Reply
#3
"that is the job of the IDE, not the compiler.. sorry. "

yes, i want this option on fbide interpreter
automaticly on parameter

thanx for all your answer

:mrgreen:
ld QuickBasic
maybe New on Freebasic
Reply
#4
revinput is a function enhanced for input char on screen

we can write a word, change it , select char and only type it, insert, delet, enter the lenght of the files and color

Very nice function

You have not respond if it's possible to add a QB library
i have try 'include "altquick.lib" to win32 folder, the interperter write no error, and the function not run ??
Maybe this function exist on a external FB library

Thx for all :rotfl:
ld QuickBasic
maybe New on Freebasic
Reply
#5
Because QB libraries are 16-bit, you cannot use them with FB. Sorry. Tongue

Also, there is no such thing as a FB interpreter. Nobody's ever found a reason to write an interpreted version yet, so there's just a compiled version.
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#6
thx
:rotfl:
ld QuickBasic
maybe New on Freebasic
Reply
#7
finnaly, i have rewrote a little programm
with enhanced Input like revinput on altquick qb45 library

i t's only for pleasure
it's possible off course to enhance the little code

In French 'J'adore réinveter le fil à couper le beurre"

If thats interess you ??




declare sub revinput(text$,longtext,poslig,poscol,colordev,colorfond,Autoris$,fonct$)
screen 18

'poscol=debut de colonne à l'affichage
'poslig=debut de ligne à l'affichage
'longtext=longueur de la zone de saisie
'colordev=color des caractères
'colorfond=color de fond
'Autoris=caractères autorisés en saisie ""=tous
'Text$="Hello":longtext=30:poscol=15:poslig=12:colordev=12:colorfond=11:Autoris$=""

ligne=1
debut:
select case ligne
case 1
call revinput(text1$,30,12,15,12,11,"",fonct$)
color 13,0:locate 12,15:print text1$
if fonct$="+" or fonct$="OK" then ligne=ligne+1
if fonct$="-" then ligne=3
if fonct$="CANCEL" then goto fin
case 2
call revinput(text2$,30,13,15,12,11,"",fonct$)
color 13,0:locate 13,15:print text2$
if fonct$="+" or fonct$="OK" then ligne=ligne+1
if fonct$="-" then ligne=ligne-1
if fonct$="CANCEL" then goto fin
case 3
call revinput(text3$,30,14,15,12,11,"",fonct$)
color 13,0:locate 14,15:print text3$
if fonct$="+" or fonct$="OK" then ligne=1
if fonct$="-" then ligne=ligne-1
if fonct$="CANCEL" then goto fin
end select
goto debut
fin:



sub revinput(text$,longtext,poslig,poscol,colordev,colorfond,Autoris$,fonct$)
if len(text$)<longtext then text$=text$+space$(longtext-len(text$))
longueur=1 :insert$="N"

debutsaisie:

color colordev,colorfond::locate poslig,poscol:print text$
screnres=16 'si screen=18
if longueur>longtext then longueur=longtext

line ((poscol-1)*8,(poslig-1)*screnres+15) - ((poscol+longtext)*8-9,(poslig-1)*screnres+15),colorfond
line ((poscol+longueuR-1)*8-8,(poslig-1)*screnres+15) - ((poscol+longueur-1)*8-1,(poslig-1)*screnres+15),colordev+1

a=getkey

if a=21247 and insert$="N" then
insert$="O" ' Si insertion
goto debutsaisie
endif
if a=21247 and insert$="O" then
insert$="N" ' Si insertion
goto debutsaisie
endif

if a=19455 then ' fleche à gauche
if longueur>1 then longueur=longueur-1
goto debutsaisie
endif
if a=19967 then ' fleche à droite
if longueur<longtext then longueur=longueur+1
goto debutsaisie
endif

if a=21503 then ' Touche suppression
text$=left$(text$,longueur-1)+mid$(text$,longueur+1,longtext-longueur+1)+" "
goto debutsaisie
endif
if a=8 then ' Touche Backspace
if longueur >1 then
longueur=longueur-1
text$=left$(text$,longueur-1)+mid$(text$,longueur+1,longtext-longueur+1)+" "
endif
goto debutsaisie
endif
'
' Touche de Fonctions
'
if a=13 then fonct$="OK":goto finrevinput
if a=27 then fonct$="CANCEL":goto finrevinput
if a=20735 then fonct$="+":goto finrevinput
if a=18687 then fonct$="-":goto finrevinput
if a=15359 then fonct$="F1":goto finrevinput
if a=15615 then fonct$="F2":goto finrevinput
if a=15871 then fonct$="F3":goto finrevinput
if a=16127 then fonct$="F4":goto finrevinput
if a=16383 then fonct$="F5":goto finrevinput
if a=16639 then fonct$="F6":goto finrevinput
if a=16895 then fonct$="F7":goto finrevinput
if a=17151 then fonct$="F8":goto finrevinput
if a=17407 then fonct$="F9":goto finrevinput
if a=17663 then fonct$="F10":goto finrevinput
if a=34303 then fonct$="F11":goto finrevinput
if a=34559 then fonct$="F12":goto finrevinput
if a=21759 then fonct$="F13":goto finrevinput
if a=22015 then fonct$="F14":goto finrevinput
if a=22271 then fonct$="F15":goto finrevinput
if a=22527 then fonct$="F16":goto finrevinput
if a=22783 then fonct$="F17":goto finrevinput
if a=23039 then fonct$="F18":goto finrevinput
if a=23295 then fonct$="F19":goto finrevinput
if a=23551 then fonct$="F20":goto finrevinput
if a=23807 then fonct$="F21":goto finrevinput
if a=24063 then fonct$="F22":goto finrevinput
if a=34815 then fonct$="F23":goto finrevinput
if a=35071 then fonct$="F24":goto finrevinput
'
' si dépassement de caractères
'
if longueur>longtext then
beep
goto debutsaisie
endif
'
' uniquement caractère ASCII
'
if a<15 or a>255 then goto debutsaisie

if autoris$<>"" then
for zautoris=1 to len(autoris$)
if mid$(autoris$,zautoris,1)=chr$(a) then goto xautoris
next
goto debutsaisie
xautoris:
endif
'
' Ajout ou modification des caractères
'
if insert$="N" then
mid$(text$,longueur,1)=chr$(a)
longueur=longueur+1
goto debutsaisie
endif
if insert$="O" then
text$=left$(text$,longueur-1)+chr$(a)+mid$(text$,longueur,longtext-longueur)
goto debutsaisie
endif
GOTO DEBUTSAISIE
'
' affiche resultat final
'
finrevinput:
color colordev:locate poslig,poscol:print text$
end sub
ld QuickBasic
maybe New on Freebasic
Reply
#8
Quote:In French 'J'adore réinveter le fil à couper le beurre"

If thats interess you ??

"reinventing the wheel"? ;p

use code tags


[code]

print "hello"

[/code]


if you have any questions, just ask =)
Reply
#9
My only regret for freebasic is thats FB have not the F4 and F6 function from QB4.5
With the Fbide interpreter and type sleep at end of the programm for wiew the result of programm and not prematur quit

Mouse usage is better, date too, screen too, large memory too
it's damage with probleme conversion between qb and FB like GET, str$

The a$=input command crash fbide lol

freebasic for newbie is good and better for windows xp
Smile

Thx for all

i not understand 'use code tags ?? '
ld QuickBasic
maybe New on Freebasic
Reply
#10
try this for the end of program pause, it works anywhere you use "end" or if you compile with error checking, if your program then throws an exception, the destructor is executed last.

Code:
sub closeandwait() destructor

  shell "pause"

end sub



code tags are like this


[code]sub closeandwait() destructor

shell "pause"

end sub[/code]

then it looks like above. ;p
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)