1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 09:20:38 +00:00

Updates help files.

This commit is contained in:
Fellippe Heitor 2021-08-28 01:56:00 -03:00
parent a1a6fa6edb
commit 1ad0cfa114
9 changed files with 13 additions and 58 deletions

View file

@ -7,7 +7,7 @@ The [[CLS]] statement clears the [[_DEST|current write page]].
{{PageParameters}}
* {{Parameter|method%}} specifies which parts of the page to clear, and can have one of the following values:
** CLS    - clears the active graphics or text viewport or the entire text screen and refreshes bottom function [[KEY LIST|KEY ON]] line.
** CLS - clears the active graphics or text viewport or the entire text screen and refreshes bottom function [[KEY LIST|KEY ON]] line.
** CLS 0 - Clears the entire page of text and graphics. Print cursor is moved to row 1 at column 1.
** CLS 1 - Clears only the graphics view port. Has no effect for text mode.
** CLS 2 - Clears only the text view port. The print cursor is moved to the top row of the text view port at column 1.
@ -31,7 +31,7 @@ The [[CLS]] statement clears the [[_DEST|current write page]].
{{Cl|CLS}} , 15
{{Cl|_PRINTMODE }} _KEEPBACKGROUND 'keeps the text background visible
{{Cl|COLOR}} 0: {{Cl|PRINT}} "This is black text on a white background!"
K$ = {{Cl|INPUT$}}(1
K$ = {{Cl|INPUT$}}(1)
{{CodeEnd}}
:''Explanation:'' [[_PRINTMODE]] can be used with [[PRINT]] or [[_PRINTSTRING]] to make the text or the text background transparent.

View file

@ -14,8 +14,8 @@ The [[CONST]] statement globally defines one or more named numeric or string val
{{PageDescription}}
* The {{Parameter|constantName}} does not have to include a type suffix. The datatype is automatically infered by the compiler using the {{Parameter|value}}.
* Constant values cannot reference a variable, [[SUB]] or [[FUNCTION]] return values when defined.
** The exception to the above are color functions [[_RGB32]] and [[_RGBA32]], which can be used in a CONST statement. See ''Example 2'' below.
* Constant values cannot reference a variable or [[FUNCTION]] return values.
** The exception to the above are the internal functions: [[_PI]], [[_ACOS]], [[_ASIN]], [[_ARCSEC]], [[_ARCCSC]], [[_ARCCOT]], [[_SECH]], [[_CSCH]], [[_COTH]], [[COS]], [[SIN]], [[TAN]], [[LOG]], [[EXP]], [[ATN]], [[_D2R]], [[_D2G]], [[_R2D]], [[_R2G]], [[_G2D]], [[_G2R]], [[ABS]], [[SGN]], [[INT]], [[_ROUND]], [[_CEIL]], [[FIX]], [[_SEC]], [[_CSC]], [[_COT]], [[ASC]], [[_RGB32]], [[_RGBA32]], [[_RGB]], [[_RGBA]], [[_RED32]], [[_GREEN32]], [[_BLUE32]], [[_ALPHA32]], [[_RED]], [[_GREEN]], [[_BLUE]], [[_ALPHA]] (See Example 2 below).
* Constants cannot be reassigned values. They retain the same value throughout all of the program procedures.
* Constants defined in module-level code have [[SHARED|shared]] scope, so they can also be used in [[SUB]] or [[FUNCTION]] procedures.
* Constants defined in [[SUB]] or [[FUNCTION]] procedures are local to those procedures.

View file

@ -37,45 +37,7 @@ The '''DECLARE LIBRARY''' declaration allows the use of external library [[SUB]]
{{PageExamples}}
''Example 1:'' Using an '''SDL''' library procedure as a program SUB procedure to move the mouse pointer to a coordinate (works in versions prior to 1.000):
{{CodeStart}} '' ''
{{Cl|DECLARE LIBRARY}}
{{Cl|SUB}} SDL_WarpMouse ({{Cl|BYVAL}} column {{Cl|AS}} {{Cl|LONG}}, {{Cl|BYVAL}} row {{Cl|AS}} {{Cl|LONG}}) 'SDL procedure name
{{Cl|DECLARE LIBRARY|END DECLARE}}
{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 256) 'simulate screen 12 with 256 colors
{{Cl|RANDOMIZE}} {{Cl|TIMER}}
{{Cl|DO}}
{{Cl|_DELAY}} 1
x = {{Cl|RND}} * 640: y = {{Cl|RND}} * 480
{{Cl|LINE}} (x, y)-{{Cl|STEP}}(10, 10), {{Cl|RND}} * 100 + 32, BF
MouseMove x + 5, y + 5
{{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|LEN}}({{Cl|INKEY$}}) 'any keypress quits
{{Cl|END}}
{{Cl|SUB}} MouseMove (x {{Cl|AS}} {{Cl|LONG}}, y {{Cl|AS}} {{Cl|LONG}})
SDL_WarpMouse x, y 'call SDL library procedure
{{Cl|END SUB}} '' ''
{{CodeEnd}}
{{small|Code by Galleon}}
:''Explanation:'' The SDL Library is included and loaded with QB64 versions prior to 1.000, so these procedures are directly available for use.
<center>'''Using [[ALIAS]] to create a program SUB or FUNCTION''' using '''QB64 SDL ONLY'''</center>
{{CodeStart}} '' ''
{{Cl|SCREEN}} 12
{{Cl|DECLARE LIBRARY}}
{{Cl|SUB}} MouseMove {{Cl|ALIAS}} SDL_WarpMouse ({{Cl|BYVAL}} column&, {{Cl|BYVAL}} row&)
{{Cl|DECLARE LIBRARY|END DECLARE}}
{{Cl|_DELAY}} 2
MouseMove 100, 100
{{Cl|_DELAY}} 2
MouseMove 200, 200 '' ''
{{CodeEnd}}
:''Explanation:'' When a Library procedure is used to represent another procedure name use [[ALIAS]] instead. Saves creating a SUB!
''Example 2:'' Don't know if a C function is defined by C++ or QB64? Try using empty quotes.
''Example:'' Don't know if a C function is defined by C++ or QB64? Try using empty quotes.
{{CodeStart}} '' ''
{{Cl|DECLARE LIBRARY}} ""
{{Cl|FUNCTION}} addone& ({{Cl|BYVAL}} value&)
@ -87,7 +49,6 @@ MouseMove 200, 200 '' ''
<center>'''QB64 version 1.000 and up produce standalone executables. External DLL files must be distributed with your program.'''</center>
<center>'''Note: QB64 versions prior to 1.000 require all default DLL files to either be with the program or in the C:\WINDOWS\SYSTEM32 folder.'''</center>
''See also:''

View file

@ -31,7 +31,7 @@ Example: Displaying default paths in Windows only.
{{Cl|PRINT}} "MUSIC=" + {{Cl|_DIR$}}("music")
{{Cl|PRINT}} "VIDEO=" + {{Cl|_DIR$}}("video")
{{Cl|PRINT}} "APPLICATION DATA=" + {{Cl|_DIR$}}("data")
{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data"
{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data")
{{CodeEnd}}
{{OutputStart}}DESKTOP=C:\Documents and Settings\Administrator\Desktop\
DOWNLOADS=C:\Documents and Settings\Administrator\Downloads\

View file

@ -49,7 +49,7 @@ The {{KW|STATIC}} keyword is used in declaration statements to control where var
{{Cl|PRINT}} Factorial(0)
{{Cl|PRINT}} Factorial(5)
{{Cl|PRINT}} Factorial(50
{{Cl|PRINT}} Factorial(50)
{{Cl|FUNCTION}} Factorial# ( n {{Cl|AS}} {{Cl|DOUBLE}} )
{{Cl|CONST}} maxNToCache = 50

View file

@ -13,16 +13,16 @@
* Literal string ends are designated by quotation marks such as: "text". Use [[CHR$]](34) to add quotes to string values.
* Variable suffix type definition is $ such as: text$.
* STRING values are compared according to the [[ASCII]] code values from left to right until one string code value exceeds the other.
* '''NOTE: Many QBasic keyword variable names CAN be used with a [[STRING]] suffix($) ONLY! You CANNOT use them without the suffix, use a numerical suffix or use [[DIM]], [[REDIM]], [[_DEFINE]], [[BYVAL]] or [[TYPE]] variable [[AS]] statements!'''
:::::'''Creating a fixed length STRING variable in QBasic:'''
:::::'''Creating a fixed length STRING variable'''
:* Variable$ = " " ' 1 space creates a one [[_BYTE|byte]] string length in a procedure(not fixed)
:* Variable$ = SPACE$(n%) ' defined as a n% length string in a procedure(not fixed)
:* [[DIM]] variable AS STRING * n% ' fixed string length cannot be changed later
:* Variable AS STRING * n% ' fixed string length in a [[SUB]] parameter or [[TYPE]] definition.
:* [[CONST]] variables can also be used after the constant value is defined.
:* Fixed length strings may not be initialized with spaces and may contain only a series of CHR$(0) at program start.
:::::'''QB64 fixed length string type suffixes'''

View file

@ -31,7 +31,7 @@ Example: Displaying default paths in Windows only.
{{Cl|PRINT}} "MUSIC=" + {{Cl|_DIR$}}("music")
{{Cl|PRINT}} "VIDEO=" + {{Cl|_DIR$}}("video")
{{Cl|PRINT}} "APPLICATION DATA=" + {{Cl|_DIR$}}("data")
{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data"
{{Cl|PRINT}} "LOCAL APPLICATION DATA=" + {{Cl|_DIR$}}("local application data")
{{CodeEnd}}
{{OutputStart}}DESKTOP=C:\Documents and Settings\Administrator\Desktop\
DOWNLOADS=C:\Documents and Settings\Administrator\Downloads\

View file

@ -1,15 +1,12 @@
{{DISPLAYTITLE:_LOADIMAGE}}
The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG]] image handle values that are less than -1.
{{PageSyntax}}
:{{Parameter|handle&}} = [[_LOADIMAGE]]({{Parameter|filename$}}[, {{Parameter|mode%}}])
{{PageParameters}}
*{{Parameter|filename$}} is literal or variable [[STRING]] file name value.
*Optional {{Parameter|mode%}} [[INTEGER]] values can be:
**32 = 32-bit
@ -17,7 +14,6 @@ The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG]
{{PageDescription}}
*Various common image file formats supported, like BMP, JPG, PNG, etc. A path can also be given.
*The {{Parameter|mode%}} can designate 32-bit color or 33 ('''version 1.000 and up'''). Omit to use the current graphic screen settings.
*Mode 33 images are '''hardware''' accelerated and are created using [[_LOADIMAGE]] or [[_COPYIMAGE]] ('''version 1.000 and up''').
@ -29,7 +25,6 @@ The [[_LOADIMAGE]] function loads an image into memory and returns valid [[LONG]
{{PageErrors}}
*Some picture file images may not load when a {{Parameter|mode%}} value is designated. Try loading it without a {{Parameter|mode%}} designation.
*'''It is important to free unused or discarded images with [[_FREEIMAGE]] to prevent CPU memory overflow errors.'''
*'''In text-only [[SCREEN]] 0, {{Parameter|mode%}} 32 must be specified.''' When loading an [[_ICON]] image use 32 for the {{Parameter|mode%}} too.
@ -80,7 +75,6 @@ DO
{{PageSeeAlso}}
*[[_FREEIMAGE]], [[_ICON]]
*[[_PUTIMAGE]], [[_MAPTRIANGLE]]
*[[_NEWIMAGE]], [[_COPYIMAGE]]

View file

@ -3,11 +3,11 @@ The [[_WINDOWHANDLE]] function returns the window handle assigned to the current
{{PageSyntax}}
: {{Parameter|hwnd&&}} = [[_WINDOWHANDLE]]
: {{Parameter|hwnd%&}} = [[_WINDOWHANDLE]]
{{PageDescription}}
* The result is an [[_INTEGER64]] number assigned by Windows to your running program.
* The result is an [[_OFFSET]] number assigned by Windows to your running program.
* Use it to make [[Windows Libraries|API calls]] that require a window handle to be passed.
* [[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Not available in Linux or macOS]].
@ -49,7 +49,7 @@ The [[_WINDOWHANDLE]] function returns the window handle assigned to the current
'----------------------------------------------------------------------------------------
{{Cl|DECLARE LIBRARY|DECLARE DYNAMIC LIBRARY}} "user32"
{{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|LONG}}, Message {{Cl|AS}} {{Cl|STRING}}, Title {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} MBType {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}})
{{Cl|FUNCTION}} MessageBoxA& ({{Cl|BYVAL}} hwnd {{Cl|AS}} {{Cl|_OFFSET}}, Message {{Cl|AS}} {{Cl|STRING}}, Title {{Cl|AS}} {{Cl|STRING}}, {{Cl|BYVAL}} MBType {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}})
{{Cl|DECLARE LIBRARY|END DECLARE}}
DO