Part II - Converts v7.03 26.01.2019 2.1 Converts 2.2 GfaBasic 2.3 PureBasic 4.00 2.4 PureBasic 4.30 2.5 PureBasic 4.40 2.6 PureBasic 4.50 2.7 PureBasic 4.60 2.8 PureBasic 5.11 2.9 PureBasic 5.20 2.10 PureBasic 5.70 2.x Uncovered |
PureBasic is a native 32-bit and 64-bit programming language based on established BASIC rules. The key features of PureBasic are portability (Windows, Linux and MacOS X are currently supported), the production of very fast and highly optimized executables and, of course, the very simple BASIC syntax. Purebasic 5.70 LTS Multilingual RETAIL (Win/Mac/Lnx) 226 MB (Total) PureBasic is a native 32-bit and 64-bit programming language based on established BASIC rules. The key features of PureBasic are portability (Windows, Linux and MacOS X are currently supported), the production of very fast and highly optimized executables and, of course, the. Download PureBasic 5.70 LTS Windows/Linux/macOS for free at ShareAppsCrack.com and many other applications - shareappscrack.com.
2.1 Converts
This page is dedicated to those coming from another dialect, or older versions.
You can find a (long) list of updates and changes in the PureBasic help file. Scroll to the bottom of the 'contents' tab and click on 'History'.
PureBasic freshmen may want to skip this page and continue with the primer!
2.2 GfaBasic converts
This part of the survival guide helps former GfaBasic users to get started with the Windows version of PureBasic.
Why? Because Gfa is no more. Why PureBasic? Because it somewhat resembles GfaBasic. Why convert? Because Gfa is no more, and 32 bit PureBasic makes life a lot easier than old 16 bit GfaBasic for Windows. Why not GfaBasic32? Because it is no more either (and I never liked it anyway).
Why this page? To save you time (and to spare you the troubles others went through).
First have a look at the previous page, if you haven't done so already. Then continue below, where you will find a number of samples and conversions. This is far from complete, more might be added later. Or not.. eternally under construction :-)
Variable-types
Variable names follow standard conventions. Variable types are defined using a postfix, except for pointers.
; purebasic a.l = 1 b.l = 0 ; there's no boolean, but 0 = false, <>0 = true c$ = 'test' ; or c.s = 'test' *d = @c$ ; pointers resemble integers with a different name |
Variable scope
Variables in GFA are by default global, in PureBasic they are by default local. See also here.
Procedures
In PureBasic there is no difference between a function and a procedure. Any procedure can return a value. The type of variable returned is defined in the procedure declaration.
; purebasic Procedure test1() ; do nothing EndProcedure Procedure.l test2(a.l,b.l) c.l = a+b ProcedureReturn c EndProcedure test1() d.l = test2(1,2) |
Keywords
Alphabetical list of GfaBasic vs. PureBasic equivalent or alternative keywords / functions.
; purebasic | |
% | |
^ | Pow() |
++ | +1 |
char{} | PokeS() |
do . loop | Repeat . Forever |
exist() | FileSize() |
function . return . endfunc | Procedure . ProcedureReturn . Endprocedure |
getprocaddress() | GetFunction() |
inkey$ | Inkey() |
input$(1) | no equivalent |
instr() | FindString() |
l: | no equivalent |
loadlibrary() | OpenLibrary() |
mod | % |
not | Not |
p:() | CallFunctionFast() |
PrintN() | |
procedure . return | Procedure . EndProcedure |
rinstr() | no equivalent (see x_rfindstring()) |
select . case . endselect | Select . Case . Endselect |
string$() | Lset() |
v: | @ |
DLL's
In 16 bit GfaBasic it is necessary to do type forcing / type conversion when making a DLL call. This is not necessary in PureBasic.
; purebasic 4.30 ws_winsock_h.i = OpenLibrary(1,'WSOCK32.DLL') ; load the DLL and get back the DLL handle *ws_wsastartup = GetFunction(1,'WSAStartup') ; find the address of the function .. ws_retval.i = CallFunctionFast(*ws_wsastartup,$101,@ws_wsadata) |
2.3 PureBasic 4.00
PureBasic 3.94 was a giant leap forward from older versions. Now v4.00 and all later versions go to infinity and beyond ;-) Yes, as usual they break older code (a PureBasic habit) but what you get in trade is soooo cool, you're definitely going to like it. Here I'll add a few of the more obvious changes..
Changes
Some functions have changed in naming or syntax to become more consistent, or have been slightly improved, or are simply outright new. First stuff that changed, by keyword..
4.xx | |
Inkey() | only returns a single character |
IsFunction() | GetFunction() |
Procedure() | now supports default values and optional parameters |
Protected, Shared, Global, Static | now allows assignment of values to variables |
ResizeWindow(), MoveWindow() | now combined similar to ResizeGadget() |
Select Case EndSelect | Case now supports ranges |
ReadByte(), ReadWord(), ReadString(), etc. | specify file number: ReadByte(<nr>) etc. |
UseFile() | obsolete, file nr now specified in file commands |
UseWindow() | obsolete, window nr now specified in window commands |
WindowWidth(), WindowHeight() | WindowWidth(<nr>), WindowHeight(<nr>) |
New features
global variables and procedure parameters can now have the same names |
automatic protection of global variables when used as procedure parameters |
strings can now be of any size and may be of an unlimited length |
UniCode support with a special new variable type .c (char, used for Unicode independency) |
new string variant added: fixed length strings .s{<length>} |
additional types 64 bit .q and double float .d |
Not is now! we finally got it.. so is XOr by the way |
Swap does what it says, it swaps two variables of the same type |
With / EndWith makes filling structures easier |
prototypes and pseudotypes |
and more.. see the readme.txt file in the PureBasic folder, check the help file, and visit the forum! |
![Purebasic Purebasic](https://pixhost.icu/avaxhome/04/8a/00688a04.jpg)
2.4 PureBasic 4.30
A new version, and new updates! And, as usual, it breaks your existing code :-)
Biggest change is the support of the new integer variable type .i for 32 or 64 bit programs. Just like the size of 'char' .c depends on Unicode mode, so does the size of 'integer' .i depend on the platform the code will be run on. The same applies to pointers!
The x86 32 bits version and x64 64 bits version have two different install packages. You can write cross platform code, but you can't generate it on the same platform.
- Use Linux to generate Linux programs.
- Use Windows 32 bits to generate and test 32 bits programs.
- Use Windows 64 bits to generate and test either 32 bits or 64 bits programs.
Changes.
Some functions have changed in naming or syntax to become more consistent, or have been slightly improved, or are simply outright new. First stuff that changed, by keyword..
4.30 | |
CreateGadgetList() | no longer in use, each OpenWindow() now creates its own gadgetlist, you can still use UseGadgetList() |
Read | you now specify the type of data to be read, as in Read.s Read.l etcetera |
StrQ(), ValQ() | .. are no longer needed (see the help file) |
CountList() | ListSize() |
lists and arrays as procedure parameters | now need additional keywords (not sure if it was 4.30 that changed this though.. could be earlier) |
New features.
DesktopX() and DesktopY() make multi monitor programming easier |
2.5 PureBasic 4.40
Another version, another chance to break things :-)
Many new features showed up in 4.40. Some of the changes below might have been introduced in a previous version, in which case I simply missed them :-)
Changes.
4.40 | |
CallFunctionFast() | CallFunctionFast() only accepts integers, preceed strings by the '@' character |
FlipBuffer() | the synchronization parameter has moved to OpenScreen() |
DrawingMode() | PureBasic now supports alpha channels |
default library subsystem DirectX7 | default library subsystem DirectX9 |
Other.
new unsigned variable types .a and .u |
hash tables aka maps (very cool feature!) |
regular expressions |
sqlite blobs |
projects |
2.6 PureBasic 4.50
Shorter release cycle with perhaps fewer features but indeed some important ones! Many bugs seem to be squashed as well.
One of the important changes is the way lower depth images are now handled.. all images are now 24 bits (without alpha channel) or 32 bits (with alpha channel), though you can still save them with a lower depth. Also pay attention to the improvements to the debugger..
Changes.
4.50 | |
multiple image depths (on Windows only) | images are now either 24 or 32 bits! |
Other.
purifier tool |
improved debugger |
data breakpoints |
Obviously, and as usual.. this doesn't mean there were no other changes, it just means I didn't spot them, used them, of bothered mentioning them :-)
2.7 PureBasic 4.60b1
This upcoming release mostly brings improvements on the 3D side, but there are some other additions and improvements as well.
2.8 PureBasic 5.11
I've skipped a few versions, and the list of changes is humongous! Check the 'history' section in the help file for an overview of all changes. Here are some that caught my attention:
retrieve environmental information such as ComputerName() |
line continuation aka multiline (yes!) |
wordwrap in the editor gadget |
open files in shared mode |
new sounds commands like GetSoundPosition() |
FreeXXX() |
Bool() |
improved TypeOf() |
updated SQLite and Ogre |
better Mac support |
many 3D commands |
IDE: reformatting code and other improvements |
form designer |
2.9 PureBasic 5.20
And more changes, mostly related to audio, graphics and joystick. Especially the sprite stuff has been redone. Good stuff for those that want to build a game..
Tuneskit apple music converter 2 0 1.
2.10 PureBasic 5.70 LTS
2.10 PureBasic 5.70 LTS
After a long time I'm working again on the survival guide. In the meantime, purebasic 5.70 arrived, and as usual it made some (many!) chances.. As I've been paying little attention since 5.11 the list of changes since 5.11 would become rather large.. I'll just settle for my major observations.. Of course I might simply have overlooked any of these in earlier versions..
session history |
Enumerate now supports 'names' |
Get ready and start with Primer Part I!
2.x Uncovered..
This little section is here for my own use, so I can see what I forgot, need to add, or just ignore.. Move on, people, nothing to see here :-)
Aall sprite3d stuff
a.point = b.point
addwindowtimer()
Ascii()
B
blob
blob
C
cpuname()
customgradient()
clearstructure
cipher libraryCopyList() CopyMap() CopyArray() FreeList() FreeMap() FreeArray()
CopyStructure()
cipher library
CreateFile() unicode support
ClipOutput(), UnclipOutput(), SetOrigin(), GetOriginX(), GetOriginY()
CPUName(), Un/BindEvent(), Un/BindGadgetEvent(), Un/BindMenuEvent()
cpuname()
customgradient()
clearstructure
cipher libraryCopyList() CopyMap() CopyArray() FreeList() FreeMap() FreeArray()
CopyStructure()
cipher library
CreateFile() unicode support
ClipOutput(), UnclipOutput(), SetOrigin(), GetOriginX(), GetOriginY()
CPUName(), Un/BindEvent(), Un/BindGadgetEvent(), Un/BindMenuEvent()
D
DPI aware support for windows apps
DesktopResolutionX(), DesktopResolutionY(), DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY()
directx11
data
defined() ?
datasection
drawrotatedtext()
datasection
Defined() function
drawalphaimage()
Div ?
DisplayTranslucentSprite() -> replaced with 'Alpha' parameter for DisplayTransparentSprite()
DisplaySolidSprite() -> replaced with 'Color' parameter for DisplayTransparentSprite()
DisplayRGBFilter() -> can be replaced with a zoomed sprite with color
DisplayShadowSprite() -> can be replaced with DisplayTransparentSprite() with color
DPI aware support for windows apps
DesktopResolutionX(), DesktopResolutionY(), DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY()
directx11
data
defined() ?
datasection
datasection
Defined() function
Div ?
DisplayTranslucentSprite() -> replaced with 'Alpha' parameter for DisplayTransparentSprite()
DisplaySolidSprite() -> replaced with 'Color' parameter for DisplayTransparentSprite()
DisplayRGBFilter() -> can be replaced with a zoomed sprite with color
DisplayShadowSprite() -> can be replaced with DisplayTransparentSprite() with color
E
editorgadget wordwrap
Event()
eventtimer()
finishdatabasequery()
exist() ?
EnumerationBinary
ExamineRegularExpression()
editorgadget wordwrap
Event()
eventtimer()
EnumerationBinary
ExamineRegularExpression()
F
fonts
FlushPreferenceBuffers()
G
GetSoundPosition()
FormatNumber()
gradientcolor() etc.
FlushPreferenceBuffers()
grabdrawingimage()
fonts
FlushPreferenceBuffers()
G
GetSoundPosition()
FormatNumber()
gradientcolor() etc.
FlushPreferenceBuffers()
G
GetUserDirectory()
GadgetWidth/Height() #PB_Gadget_RequiredSize support
GIF decoder support
GetUserDirectory()
GadgetWidth/Height() #PB_Gadget_RequiredSize support
GIF decoder support
H
I
Interface
imageframes (SetImageFrame etc.)
import / importc / endimport
interfaces
Interface
imageframes (SetImageFrame etc.)
interfaces
J
joystick()
JoystickName(), JoystickZ()
joystick()
JoystickName(), JoystickZ()
K
L
lineargradient() etc.
line continuation character _ ?
Literal string escape support using '~'
license files to easy add the needed information when shipping PB programs (see reference documentation)
lineargradient() etc.
Literal string escape support using '~'
license files to easy add the needed information when shipping PB programs (see reference documentation)
M
Module
MemoryStringLength()
Mod ?
module support
multicharacter stringfield
monitor coordinates
maps
memorysize()
macro's
Module
MemoryStringLength()
Mod ?
module support
multicharacter stringfield
monitor coordinates
memorysize()
N
network library
new IDE shortcuts ^e ^m
network library
new IDE shortcuts ^e ^m
O
OpenConsole: an optional 'Mode' parameter for OpenConsole()
OpenScreen() flipmode and refreshrate
on x call y,y,y,y ?
offsetof
outputwidth()
OpenConsole: an optional 'Mode' parameter for OpenConsole()
OpenScreen() flipmode and refreshrate
on x call y,y,y,y ?
outputwidth()
P
postgresqldatabase()
projects
preferences
PlaySound() volume support
PostEvent()
projects
preferences
PlaySound() volume support
PostEvent()
Q
R
Runtime
runtime library ?
removewindowtimer()
RGBA() Alpha()
read
resize window / resize gadget etc. ?
ReverseString()
RoundRect()
regular expressions
ReceiveHTTPMemory()
ReadCharacter unicode support
RunProgram() unicode support
ReadFile() shared read / write
ReadProgramString() format parameter
RefreshDialog()
ReceiveHTTPMemory()
ReceiveHTTPFile()
Runtime
runtime library ?
removewindowtimer()
read
resize window / resize gadget etc. ?
ReverseString()
RoundRect()
ReceiveHTTPMemory()
ReadCharacter unicode support
RunProgram() unicode support
ReadFile() shared read / write
ReadProgramString() format parameter
RefreshDialog()
ReceiveHTTPMemory()
ReceiveHTTPFile()
S
string escape support using ~
StringFingerPrint()
SetRefreshRate()
ShortcutGadget()
StatusBarImage()
ScreenWidth()
sizeof
statusbarprogress()
statusbarimage()
shortcutgadget()
SaveImage() depth parameter
statusbarheight() ?
sgn() ?
SetDatabaseBlob(), SetDatabaseFloat(), SetDatabaseDouble(), SetDatabaseLong()
StringFingerprint()
StartFingerprint() NextFingerprint() AddFingerprint() etc.
SpriteOutput() for DX and OpenGL 32 bit support
StartSpecialFX(), StopSpecialFX(), DisplayAlphaSprite(), ChangeAlphaIntensity(), UseBuffer()
string escape support using ~
StringFingerPrint()
SetRefreshRate()
ShortcutGadget()
StatusBarImage()
ScreenWidth()
statusbarprogress()
statusbarimage()
SaveImage() depth parameter
statusbarheight() ?
sgn() ?
SetDatabaseBlob(), SetDatabaseFloat(), SetDatabaseDouble(), SetDatabaseLong()
StringFingerprint()
StartFingerprint() NextFingerprint() AddFingerprint() etc.
SpriteOutput() for DX and OpenGL 32 bit support
StartSpecialFX(), StopSpecialFX(), DisplayAlphaSprite(), ChangeAlphaIntensity(), UseBuffer()
T
toolbar now supports large icons and text
threads
Threaded
threaded
trim ltrim rtrimcharacter
toolbarheight() ?
tar archive support
toolbar now supports large icons and text
threads
Threaded
trim ltrim rtrim
toolbarheight() ?
tar archive support
U
UTF8()
UTF8()
V
W
X Contexts 3 5 3 – fast window switcher software.
Y
Z
zoomsprite()
zoomsprite()
#
#PB_File_SharedWrite support to ReadFile() and CreateFile()
#StringConstant$
#PB_File_SharedRead
2d drawing modes imageoutput()
.a
.u
^
7z archive creation
#PB_File_SharedWrite support to ReadFile() and CreateFile()
#StringConstant$
#PB_File_SharedRead
^
7z archive creation
PureBasic is a BASIC-based programming language that is available in both 32-bit and 64-bit versions. The key feature of this product is its portability (currently supported by Windows, Linux and Mac), the final compiled file is optimized and runs very fast. The syntax of this language is very similar to the former Basic language. This programming language is made for both beginners and professionals. The creators of this language are constantly striving to provide a system-friendly, reliable and fast language. Although this language is designed for beginners, it has many advanced capabilities, including: pointers, structures, procedures, dynamic link lists, etc. Experienced coders have no problem with different accesses to the underlying levels of Windows, they can easily Use the Windows API functions in your program and even use the assembly language inline in your program.
Features of the PureBasic programming language:
- Large volume of internal commands to simplify the process of program development and game development (more than 1400 different commands)
- Support for all BASIC keywords
- Very fast compiler for generating optimal exe files
- No need for external DLLs, runtime interpreters and… to run generated programs
- Ability to create process programs for structured programming using local and general variables
- Full Unicode support
- Access Windows API functions
- Making 2D and 3D games based on DirectX, SDL and OGRE
- Optimal and maximum use of hardware power
- Dedicated development environment and editor for easy coding
- Integrated and powerful debugger and profiler for code tracking and analysis
Installation guide
Purebasic 5 70 Inch
This version is complete and does not require activation.