1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-30 05:10:37 +00:00

Updates help files one more time.

Removes references to qb64 dot net.
This commit is contained in:
FellippeHeitor 2021-01-07 23:49:03 -03:00
parent a6c0d01933
commit f1a0146579
37 changed files with 33 additions and 222 deletions

View file

@ -23,8 +23,6 @@
{{Cl|_ICON}}
{{CodeEnd}}{{small|Code and command by Fellippe Heitor}}
<center>[http://www.qb64.net/forum/index.php?action=dlattach;topic=13762.0;attach=4558 mush.ico download]</center>
{{PageSeeAlso}}
* [[_ICON]]

View file

@ -56,7 +56,6 @@ Result = GetModuleFileNameA(0, FileName$, {{Cl|LEN}}(FileName$)) '0 designates
{{PageSeeAlso}}
* [[SHELL]], [[FILES]]
* [[MKDIR]], [[RMDIR]]
* [[DOS]], [[Batch Files]]
* [[$CONSOLE]]

View file

@ -46,7 +46,6 @@ i = {{Cl|_LOADIMAGE}}('''"qb64_trans.png"''') 'see note below examples to get th
{{CodeEnd}} '' ''
: ''Explanation:'' When QB64 loads a .PNG file containing a transparent color, that color will be properly treated as transparent when _PUTIMAGE is used to put it onto another image. You can use a .PNG file containing transparency information in a 256-color screen mode in QB64. [[CLS]] sets the [[_CLEARCOLOR]] setting using [[_RGB]].
: ''Note:'' The ''qb64_trans.png'' bee image used can be downloaded from [http://www.qb64.net/qb64_trans.png qb64_trans.png]
{{PageSeeAlso}}

View file

@ -207,7 +207,6 @@ text$ = "HelloWorld"
{{Cl|COLOR}} 7
{{Cl|PRINT}} "Color 7 is gray"
K$ = {{Cl|INPUT$}}(1)
{{Cl|_PALETTECOLOR}} 7, {{Cl|&H}}FFDAA520 ' FF alpha makes the color translucent
{{Cl|PRINT}} "Color 7 is now Goldenrod in {{Cl|SCREEN}} 0! '' ''
{{CodeEnd}}

View file

@ -96,8 +96,6 @@ MouseMove 200, 200 '' ''
* [[BYVAL]], [[ALIAS]]
* [[C Libraries]], [[DLL Libraries]], [[Windows Libraries]]
* [[Port Access Libraries]]
* [[OpenGL Libraries]], [[SDL Libraries]]
* [[SFML Libraries]]
* [[SQL Client]]

View file

@ -17,7 +17,6 @@ The [[EXP]] math function calculates the exponential function ('''e''' raised to
{{PageSeeAlso}}
*[[LOG]]
*[[Mathematical Operations]]
*[http://qb64.net/wiki/index.php?title=Mathematical_Operations#Derived_Mathematical_Functions Derived Trigonometric Functions]
{{PageNavigation}}

View file

@ -94,9 +94,8 @@ DIR$ = DirList$(Index%)
''Alternative 2:''
* The member-contributed [[FILELIST$]] function uses the mouse and does not affect your program screens. It can verify that a file name exists or display a list of long and short file names to choose from. It also avoids program errors when a file name does not exist. <!-- broken link: [http://i301.photobucket.com/albums/nn53/burger2227/FILE-ss2.jpg FILELIST$ function screenshot] -->
* The member-contributed [[FILELIST$]] function uses the mouse and does not affect your program screens. It can verify that a file name exists or display a list of long and short file names to choose from. It also avoids program errors when a file name does not exist.
<!-- The referenced library is not present in this link anymore ''See Library:'' File Exist C++ Function that does not create a temp file. [http://qb64.net/wiki/index.php?title=C_Libraries#File_Exist FileExist Function] -->
{{PageSeeAlso}}
* [[SHELL]], [[SCREEN (function)]] {{text|(See Example 3)}}
@ -104,7 +103,6 @@ DIR$ = DirList$(Index%)
* [[RMDIR]], [[KILL]]
* [[_CWD$]], [[_STARTDIR$]]
* [[_FILEEXISTS]], [[_DIREXISTS]]
* [[DOS]], [[Batch Files]], [[DOS#DIR|DIR]]
* [[Windows_Libraries#File_Exist|Windows File Exist Library]]
* [[Windows_Libraries#File_Open_and_Save_Dialog|Windows Open and Save Dialog Boxes]]
* [[$CONSOLE]]

View file

@ -58,10 +58,6 @@ PRINT "After loop, i ="; i '' ''
bye {{OutputEnd}}
<!-- removed redundant example as Example 2 above shows exactly the same technique
''See Example:''
* [http://qb64.net/wiki/index.php?title=Controller_Devices#Example Example that shows how ignoring bad FOR loops can work to a program's advantage without errors.] -->
{{PageSeeAlso}}
* [[STEP]]

View file

@ -28,7 +28,6 @@ KILL "C:\Qbasic\data\2000data.dat"
* [[RMDIR]], [[FILES]], [[SHELL]], [[OPEN]]
* [[CHDIR]], [[MKDIR]], [[NAME]]
* [[_FILEEXISTS]], [[_DIREXISTS]]
* [[DOS]], [[Batch Files]], [[DOS#DEL|DEL]]
{{PageNavigation}}

View file

@ -1359,20 +1359,11 @@ __NOTOC__
[[QB64 FAQ|Visit the QB64 FAQ]]
[http://www.qb64.net Visit the QB64 Main Site]
[https://www.qb64.org Visit the QB64 Main Site]
[http://www.qb64.net/forum/index.php Visit QB64 Community Forum]
[https://www.qb64.org/forum/ Visit QB64 Community Forum]
'''Links to other QBasic Sites:'''
[http://qbasicstation.com/index.php?c=p_member Member programs at QBasic Station]
[http://www.network54.com/Index/10167 QBasic Forum at Network 54]
[http://www.petesqbsite.com/forum/ Pete's QBasic Forum]
[http://www.petesqbsite.com/downloads/downloads.shtml Pete's QBasic Downloads]</center>
[http://discord.qb64.org Join our Discord server]
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>

View file

@ -697,7 +697,6 @@ text|creates a new folder in the designated path.}}
* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.}}
* [[INTERRUPT]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented. }}
<center>See also: [http://qb64.net/wiki/index.php?title=SDL_Libraries#Mouse SDL Mouse Library]</center>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
@ -817,9 +816,7 @@ text|creates a new folder in the designated path.}}
* [[GOTO]] (statement) {{text|sends the program to a designated line number or label.}}
* [[IF...THEN]] (statement) {{text|a conditional flow statement or block of statements.}}
* [[LOOP]] {{text|end of a DO...LOOP procedure that repeats code until or while a condition is true.}}
* [[RESUME]] (error statement) {{text|an error statement that can return the program to the NEXT code line or a specific line
4000
number.}}
* [[RESUME]] (error statement) {{text|an error statement that can return the program to the NEXT code line or a specific line number.}}
* [[RETURN]] (statement) {{text|a sub-procedure statement that returns the program to the code immediately after the procedure call.}}
* [[RUN]] (statement) {{text|clears and restarts the program currently in memory or executes another specified program.}}
* [[SELECT CASE]] (statement) {{text|determines the program flow by comparing the value of a variable to specific values.}}

View file

@ -7,7 +7,6 @@ The [[LET]] is a useless statement designed by [[cavemen]] when they started pro
{{PageDescription}}
* {{InlineCode}}LET a = 12{{InlineCodeEnd}} is the same as {{InlineCode}}a = 12{{InlineCodeEnd}}, but wastes 4 extra bytes of program space.
* Teachers should be SHOT for even teaching about it! Move on!
''Notes:'' LET is '''optional''', it's the only keyword where the '''entire keyword''' is optional :-)

View file

@ -39,7 +39,6 @@ END FUNCTION
{{PageSeeAlso}}
*[[EXP]], [[&B]] (binary number)
*[http://qb64.net/wiki/index.php?title=Mathematical_Operations#Derived_Mathematical_Functions Derived Trigonometric Functions]
{{PageNavigation}}

View file

@ -24,7 +24,6 @@ The [[NAME]] statement changes the name of a file or directory to a new name.
{{PageSeeAlso}}
* [[SHELL]], [[MKDIR]], [[FILES]]
* [[CHDIR]], [[KILL]], [[RMDIR]]
* [[DOS]], [[Batch Files]]
* [[Windows_Libraries#File_Dialog_Boxes|Windows Open and Save Dialog Boxes]]

View file

@ -1,11 +1,11 @@
The '''POINT''' function returns the pixel [[COLOR]] attribute at a specified graphics coordinate or the current graphic cursor position.
''Color'' {{PageSyntax}}
== ''Color'' Syntax ==
::::color_attribute% = '''POINT ('''''column%, row%''''')'''
''Graphic cursor position'' {{PageSyntax}}
== ''Graphic cursor position'' Syntax ==
::::pointer_coordinate% = '''POINT('''{0|1|2|3}''')'''
@ -72,7 +72,7 @@ _RGB OK
''Example 2:'' Using a POINT mouse routine to get the 32 bit color values of the QB64 Bee. [http://www.qb64.net/forum/index.php Download image from top of Forum].
''Example 2:'' Using a POINT mouse routine to get the 32 bit color values of an image.
{{CodeStart}} '' ''
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
{{Cl|_TITLE}} "Mouse {{Cl|POINT}}er 32"
@ -148,7 +148,6 @@ BG$ = {{Cl|UCASE$}}({{Cl|INPUT$}}(1))
* [[SCREEN]], [[SCREEN (function)]] {{text|(text pointer function)}}
* [[GET (graphics statement)]], [[PUT (graphics statement)]]
* [[Bitmaps]], [[Creating Sprite Masks]], [[Text Using Graphics]] (Demo)
* [http://www.qb64.net/forum/index.php?topic=11052.0 Reading pixel colors faster using _MEMIMAGE]
{{PageNavigation}}

View file

@ -30,10 +30,6 @@ SCREEN 12
''Example 2:'' Magnifying a box portion of a Mandelbrot image with PSET
{{CodeStart}} '' ''
{{Cl|DECLARE}} {{Cl|SUB}} readmouse (x {{Cl|AS}} {{Cl|INTEGER}}, y {{Cl|AS}} {{Cl|INTEGER}}, z {{Cl|AS}} {{Cl|INTEGER}})
{{Cl|DECLARE}} {{Cl|SUB}} rectangle (x1 {{Cl|AS}} {{Cl|INTEGER}}, y1 {{Cl|AS}} {{Cl|INTEGER}}, x2 {{Cl|AS}} {{Cl|INTEGER}}, y2 {{Cl|AS}} {{Cl|INTEGER}})
{{Cl|DECLARE}} {{Cl|FUNCTION}} mandel% (x {{Cl|AS}} {{Cl|DOUBLE}}, y {{Cl|AS}} {{Cl|DOUBLE}}, limit {{Cl|AS}} {{Cl|INTEGER}})
{{Cl|DECLARE}} {{Cl|SUB}} drawmand (x {{Cl|AS}} {{Cl|DOUBLE}}, y {{Cl|AS}} {{Cl|DOUBLE}}, mag {{Cl|AS}} {{Cl|DOUBLE}})
{{Cl|DEFSTR}} A-Z
{{Cl|DIM}} red(15) {{Cl|AS}} {{Cl|INTEGER}}, green(15) {{Cl|AS}} {{Cl|INTEGER}}, blue(15) {{Cl|AS}} {{Cl|INTEGER}}
{{Cl|DIM}} i {{Cl|AS}} {{Cl|INTEGER}}

View file

@ -43,7 +43,7 @@ The '''PUT''' graphics statement is used to place [[GET (graphics statement)|GET
{{CodeStart}} '' ''
{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 256)
{{Cl|_SCREENMOVE}} {{Cl|_SCREENMOVE|_MIDDLE}}
image& = {{Cl|_LOADIMAGE}}("QB64.png") '[http://www.qb64.net/forum/index.php QB64 bee image from Forum]
image& = {{Cl|_LOADIMAGE}}("QB64.png") 'replace with your own image
wide& = {{Cl|_WIDTH (function)|_WIDTH}}(image&): deep& = {{Cl|_HEIGHT}}(image&)
{{Cl|DIM}} Array(wide& * deep&) {{Cl|AS}} {{Cl|INTEGER}}

View file

@ -58,7 +58,6 @@ C:\temp is not empty!
{{PageSeeAlso}}
* [[MKDIR]], [[CHDIR]]
* [[KILL]], [[FILES]]
* [[DOS]], [[Batch Files]]
{{PageNavigation}}

View file

@ -5,7 +5,7 @@ The '''STICK''' function returns the directional axis coordinate move of game po
:: coordinate_move% = STICK(direction%)
QB64 {{PageSyntax}}
== QB64 Syntax ==
:: coordinate_move% = STICK(''direction%''[, ''axis_number%''])
@ -85,8 +85,7 @@ Buttons: 9
Buttons
-0 -1 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █ 0 0 █
{{OutputEnd}}
: ''Note:'' A Sidewinder Precision Pro requires that pins 2 and 7(blue and purple) be connected together for [http://www.qb64.net/forum/index.php?topic=4167.msg42339#msg42339 digital USB recognition.]
<center> [http://www.amazon.com/Belkin-F3U200-08INCH-Joystick-Adapter-SideWinder/dp/B000067RIV Sidewinder Precision Pro game port to USB adapter]</center>
: ''Note:'' A Sidewinder Precision Pro requires that pins 2 and 7 (blue and purple) be connected together for digital USB recognition.
''See also:''

View file

@ -34,7 +34,6 @@ The {{KW|STRING$}} function returns a {{KW|STRING}} consisting of a single chara
{{CodeEnd}}
{{OutputStart}}BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD
{{OutputEnd}}
''Note:'' The string contatenation + operator MUST be used in [[STRING]] variable definitions.
''See examples:''

View file

@ -33,8 +33,6 @@ K$ = INPUT$(1)
{{Cl|PRINT}} {{Cl|_CLEARCOLOR}}(img&) 'displays closest clear color attribute
{{Cl|END}} '' ''
{{CodeEnd}}
: ''Note:'' The ''QB64.PNG'' image can be downloaded here: [http://www.qb64.net/qb64_trans.png qb64_trans.png]. Right click and Save as ''qb64_trans.png''.
''Example 2:'' Using a _CLEARCOLOR transparency with images created on a [[_NEWIMAGE]] page. Does not require an image file.
{{CodeStart}}{{Cl|SCREEN (statement)|SCREEN}} {{Cl|_NEWIMAGE}}(512, 384, 32) ' screen uses handle value
@ -81,7 +79,7 @@ DO
{{Cl|LOOP}} {{Cl|UNTIL}} a& = 0
{{Cl|END}}
{{CodeEnd}}
:''Note:'' If the _CLEARCOLOR [http://www.qb64.net/qb64_trans.png qb64_trans.png] background was not put onto a separate page, [[_SETALPHA]] would display it also.
:''Note:'' If the _CLEARCOLOR background was not put onto a separate page, [[_SETALPHA]] would display it also.

View file

@ -48,7 +48,7 @@ DO: {{Cl|SLEEP}}: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> ""
: ''Note:'' Only free valid handle values with [[_FREEIMAGE]] AFTER a new [[SCREEN]] mode is being used by the program.
''Example 2:'' Program that copies desktop to a hardware image to form a 3D triangle ('''version 1.000 and up'''):
''Example 2:'' Program that copies desktop to a hardware image to form a 3D triangle:
{{CodeStart}} '' ''
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
my_hardware_handle = {{Cl|_COPYIMAGE}}({{Cl|_SCREENIMAGE}}, 33) 'take a screenshot and use it as our texture
@ -58,8 +58,6 @@ my_hardware_handle = {{Cl|_COPYIMAGE}}({{Cl|_SCREENIMAGE}}, 33) 'take a screensh
{{Cl|DO...LOOP|DO}}: {{Cl|_LIMIT}} 30: {{Cl|LOOP}} {{Cl|UNTIL}} {{Cl|INKEY$}} <> "" '' ''
{{CodeEnd}}{{small|Code courtesy of Galleon}}
<center>[http://www.qb64.net/forum/index.php?action=dlattach;topic=12049.0;attach=2595 Example 2 PNG image]</center>
{{PageSeeAlso}}
* [[_LOADIMAGE]], [[_NEWIMAGE]]

View file

@ -12,8 +12,7 @@ The [[_DIREXISTS]] function determines if a designated file path or folder exist
* The function reads the system information directly without using a [[SHELL]] procedure.
* The function will use the appropriate Operating System path separators. [[_OS$]] can determine the operating system.
* '''This function does not guarantee that a path can be accessed, only that it exists.'''
* '''NOTE: Checking if a folder exists in a CD drive may cause the tray to open automatically to request a disk when empty.''' To find drives in Windows, use this API Library: [http://www.qb64.net/wiki/index.php/Windows_Libraries#Disk_Drives Disk Drives]
* '''NOTE: Checking if a folder exists in a CD drive may cause the tray to open automatically to request a disk when empty.'''
{{PageExamples}}
{{Parameter|Example:'' Checks if a folder exists before proceeding.

View file

@ -11,7 +11,6 @@ The '''_KEYDOWN''' function returns whether modifying keys like CTRL, ALT, SHIFT
* Unicode references:
:* 1) What is the glyph represented by that UNICODE value: [http://www.fileformat.info/info/unicode/char/search.htm Unicode Format Info]
:* 2) Which fonts support the characters I want to use: [http://en.wikipedia.org/wiki/Unicode_typefaces#Comparison_of_fonts Unicode Fonts]
:* 3) What was the format again?: [http://www.birds-eye.net/definition/u/unicode.shtml Unicode Formats]
:* A UTF32 value is usually(but by no means always!) the same as a UTF16 value just with the top 2 bytes set to 0.
* An important difference between [[INKEY$]] and [[_KEYHIT]] is how they work when '''CTRL, ALT''' or '''SHIFT''' are used. [[INKEY$]] returns a different code if you hold down CTRL, ALT or SHIFT before pressing F1 (for example). [[_KEYHIT]] will return the same code regardless of which modifiers were used but you can check _KEYDOWN to see which modifying keys are being used.
* '''Keyboards with Alt Gr key:''' [[_KEYHIT]] may return both Alt(100307) and Ctrl(100306) codes when key is pressed or released.
@ -22,7 +21,7 @@ The '''_KEYDOWN''' function returns whether modifying keys like CTRL, ALT, SHIFT
'''0-255''': [[ASCII|ASCII and Extended code]] values (Refer to [http://en.wikipedia.org/wiki/Code_page_437 CP437])
'''256-65535''': [http://qb64.net/wiki/index.php?title=ASCII#Two_Byte_Codes ASCII 2-byte] character codes (unaffected by SHIFT/ALT/CTRL modifiers)
'''256-65535''': [http://www.qb64.org/wiki/ASCII#Two_Byte_Codes] character codes (unaffected by SHIFT/ALT/CTRL modifiers)
Use [[CVI]] to convert ASCII 2-byte codes to _KEYDOWN values.
' '''_KEYDOWN Keyboard Values'''

View file

@ -104,9 +104,6 @@ unifont = {{Cl|_LOADFONT}}("cyberbit.ttf", 24, "UNICODE")
{{small|Code by Galleon}}
<center>'''Find any keys that you cannot read or type in the IDE? Please report them at this forum link:''' http://www.qb64.net/forum/index.php?topic=1512.0</center>
{{PageSeeAlso}}
* [[_KEYDOWN]], [[_CINP]]
* [[_MAPUNICODE]], [[_MAPUNICODE (function)]]

View file

@ -69,7 +69,7 @@ DO
{{CodeEnd}}
{{small|Code by Ted Weissgerber}}
:''NOTE:'' The ''QB64.PNG'' file picturing the QB64 bee can saved from the top of the [http://www.qb64.net/forum/index.php QB64 forum]. Speed varies with image size.
:''NOTE:'' Speed varies with image size.
===More examples===

View file

@ -33,11 +33,11 @@ The [[_MAPTRIANGLE]] statement maps a triangular portion of an image onto a dest
{{PageExamples}}
''Example 1:'' Rotating the [http://www.qb64.net/qb64_trans.png QB64 bee] image using a rotation and zoom SUB with _MAPTRIANGLE.
''Example 1:'' Rotating an image using a rotation and zoom SUB with _MAPTRIANGLE.
{{CodeStart}} '' ''
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
Image& = {{Cl|_LOADIMAGE}}("qb64_trans.png") '<<< [http://www.qb64.net/qb64_trans.png Image from top of QB64 Forum]
Image& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image
{{Cl|DO}}
{{Cl|CLS}}
@ -72,7 +72,7 @@ sinr! = {{Cl|SIN}}(-Rotation / 57.2957795131): cosr! = {{Cl|COS}}(-Rotation / 57
{{WhiteEnd}}
''Example 2:'' A 3D Spinning Cube demo using the [http://www.qb64.net/qb64_trans.png QB64 bee] software image and [[_MAPTRIANGLE]]:
''Example 2:'' A 3D Spinning Cube demo using a software image and [[_MAPTRIANGLE]]:
{{CodeStart}} '' ''
' Copyright (C) 2011 by Andrew L. Ayers
@ -149,7 +149,7 @@ PLANECOL(5) = 8
'
{{Cl|_TITLE}} "QB64 _MAPTRIANGLE CUBE DEMO"
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png") ''''<<<< '''[http://www.qb64.net/qb64_trans.png Image from top of QB64 Forum]
TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png") ''''<<<< '''replace with your own image
'{{Cl|_PUTIMAGE}} , Image&
DO
@ -359,7 +359,7 @@ DO
{{CodeEnd}}{{small|Demo by Andrew L. Ayers}}
''Example 3:'' A 3D Spinning Cube demo using the [http://www.qb64.net/qb64_trans.png QB64 bee] hardware image and '''QB64GL''' hardware acceleration with [[_MAPTRIANGLE]]:
''Example 3:'' A 3D Spinning Cube demo using a hardware image and '''QB64GL''' hardware acceleration with [[_MAPTRIANGLE]]:
{{CodeStart}} '' ''
' Copyright (C) 2011 by Andrew L. Ayers
@ -437,7 +437,7 @@ PLANECOL(5) = 8
{{Cl|_TITLE}} "QB64 {{Cl|_MAPTRIANGLE}} CUBE DEMO"
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 32)
TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png", 32)'<<<< Image from top of QB64 Forum http://www.qb64.net/qb64_trans.png
TextureImage& = {{Cl|_LOADIMAGE}}("qb64_trans.png", 32)'replace with your own image
{{Cl|_SETALPHA}} 128, , TextureImage&
TextureImage& = {{Cl|_COPYIMAGE}}(TextureImage&, 33)'copy of hardware image

View file

@ -86,7 +86,6 @@ x1$ = {{Cl|_MEMGET (function)|_MEMGET}}(m, m.OFFSET, {{Cl|STRING}} * 11) 'conver
* [[_MEMGET]], [[_MEMPUT]]
* [[_MEMFREE]]
* [[$CHECKING]]
* [http://www.qb64.net/forum/index.php?topic=11052.0 Reading pixel colors faster using _MEMIMAGE] (forum post)
{{PageNavigation}}

View file

@ -15,113 +15,11 @@ The [[_OPENHOST]] function opens a Host which listens for new connections and re
* [[CLOSE]] {{Parameter|hostHandle}} closes the host. A failed handle value of 0 does not need to be closed.
{{PageExamples}}
''Example:'' Chat program that attempts to connect as a Client. If not it attempts to become the Host.
{{CodeStart}}
{{Cl|PRINT}} "Mini Messenger"
{{Cl|LOCATE}} , , 1 ' display the print cursor for INKEY$
client = {{Cl|_OPENCLIENT}}("TCP/IP:7319:localhost") ' Attempt to connect to local host as a client
{{Cl|IF...THEN|IF}} client {{Cl|THEN}}
{{Cl|PRINT}} "[connected to " + {{Cl|_CONNECTIONADDRESS}}(client) + "]"
{{Cl|_TITLE}} "Client - Mini Messenger"
{{Cl|INPUT}} "Enter your name: ", myname$
{{Cl|PRINT (TCP/IP statement)|PRINT}} #client, myname$ + " connected!"
{{Cl|DO...LOOP|DO}}
GetMessage client
SendMessage myname$, mymessage$, client ' display current input on screen
{{Cl|_DELAY}} 0.01 ' reduce CPU usage
{{Cl|LOOP}}
{{Cl|ELSE}} ' "if client" alternative to open a new Host
{{Cl|PRINT}} "[No existing host found]"
host = {{Cl|_OPENHOST}}("TCP/IP:7319") ' no host found, so begin new host
{{Cl|IF...THEN|IF}} host {{Cl|THEN}}
{{Cl|_TITLE}} "Host - Mini Messenger"
{{Cl|PRINT}} "[Beginning new host chat session!]"
{{Cl|DIM}} Users(1 to 1000) ' array to hold other client info
numclients = 0
client = {{Cl|_OPENCLIENT}}("TCP/IP:7319:localhost")
IF client = 0 THEN PRINT "ERROR: could not attach host's personal client to host!"
{{Cl|INPUT}} "Enter your name:", myname$
{{Cl|PRINT (TCP/IP statement)|PRINT}} #client, myname$ + " connected!"
{{Cl|PRINT}} "[Chat session active!]"
{{Cl|DO...LOOP|DO}} ' host main loop
newclient = {{Cl|_OPENCONNECTION}}(host) ' receive any new connection
{{Cl|IF...THEN|IF}} newclient {{Cl|THEN}}
numclients = numclients + 1
Users(numclients) = newclient
{{Cl|PRINT (TCP/IP statement)|PRINT}} #Users(numclients),"Welcome!"
{{Cl|END IF}}
{{Cl|FOR...NEXT|FOR}} i = 1 {{Cl|TO}} numclients ' distribute incoming messages to all clients
{{Cl|IF...THEN|IF}} Users(i) {{Cl|THEN}}
{{Cl|INPUT (TCP/IP statement)|INPUT}} #Users(i), message$
{{Cl|IF...THEN|IF}} message$ <> "" {{Cl|THEN}}
{{Cl|FOR...NEXT|FOR}} p = 1 {{Cl|TO}} numclients
{{Cl|IF...THEN|IF}} Users(p) {{Cl|THEN}} {{Cl|PRINT (TCP/IP statement)|PRINT}} #Users(p), message$
{{Cl|NEXT}} p
{{Cl|END IF}}
{{Cl|END IF}}
{{Cl|NEXT}} i
GetMessage client ' allow host to get messages and chat also
SendMessage myname$, mymessage$, client
{{Cl|_DELAY}} 0.01 ' reduce CPU usage
{{Cl|LOOP}}
{{Cl|END IF}} ' host
{{Cl|PRINT}} "ERROR: Could not begin new host!"
{{Cl|END IF}} ' if client from start
{{Cl|SLEEP}}
{{Cl|SYSTEM}}
'.................... END OF MAIN PROGRAM ................
{{Cl|SUB}} GetMessage (client) ' get & display any new message
{{Cl|INPUT (TCP/IP statement)|INPUT}} #client, newmessage$
{{Cl|IF...THEN|IF}} newmessage$ <> "" {{Cl|THEN}}
{{Cl|VIEW PRINT}} 1 {{Cl|TO}} 23
{{Cl|LOCATE}} 23,1
{{Cl|PRINT}} newmessage$
{{Cl|VIEW PRINT}} 1 {{Cl|TO}} 24
{{Cl|END IF}}
{{Cl|END SUB}}
{{Cl|SUB}} SendMessage (myname$, mymessage$, client) ' simple input handler
k$ = {{Cl|INKEY$}}
{{Cl|IF...THEN|IF}} {{Cl|LEN}}(k$) {{Cl|THEN}}
{{Cl|IF...THEN|IF}} k$ = {{Cl|CHR$}}(8) {{Cl|AND (boolean)|AND}} [[LEN]](mymessage$) <> 0 {{Cl|THEN}}
mymessage$ = {{Cl|LEFT$}}(mymessage$, {{Cl|LEN}}(mymessage$) - 1)
{{Cl|ELSE}}
{{Cl|IF...THEN|IF}} {{Cl|LEN}}(k$) = 1 {{Cl|AND (boolean)|AND}} {{Cl|ASC}}(k$) >= 32 {{Cl|THEN}} mymessage$ = mymessage$ + k$
{{Cl|END IF}}
{{Cl|END IF}}
{{Cl|LOCATE}} 24, 1: {{Cl|PRINT}} {{Cl|SPACE$}}(80); ' erase previous message displayed
{{Cl|LOCATE}} 24, 1: {{Cl|PRINT}} myname$ + ": ";mymessage$;
{{Cl|IF...THEN|IF}} k$ = {{Cl|CHR$}}(13) {{Cl|THEN}} ' [Enter] sends the message
{{Cl|IF...THEN|IF}} mymessage$ = "" {{Cl|THEN}} {{Cl|SYSTEM}} ' [Enter] with no message ends program
{{Cl|PRINT (TCP/IP statement)|PRINT}} #client, myname$ + ": " + mymessage$
mymessage$ = ""
{{Cl|END IF}}
{{Cl|IF...THEN|IF}} k$ = {{Cl|CHR$}}(27) {{Cl|THEN}} {{Cl|SYSTEM}} ' [Esc] key ends program
{{Cl|END SUB}}
{{CodeEnd}}
{{OutputStart}}
Mini Messenger
[No existing host found]
[Beginning new host chat session!]
Enter your name:_
{{OutputEnd}}
''Explanation:'' The SendMessage SUB program controls the program exit unless both Client and Host fail. Entering no message and hitting [Enter] or pressing the [Esc]] key closes the program. Both SUB programs allow a Client or Host to communicate with others simply. {{KW|INPUT (TCP/IP statement)|INPUT #}} is used to read messages and {{KW|PRINT (TCP/IP statement)|PRINT #}} is used to send messages. The client handle value is used as the port number. Keep in mind that this is just an example. A lot could be added, like recording IP addresses.
<center>'''To manage the users array, see the [[_CONNECTED]] page example.'''</center>
{{PageSeeAlso}}
* [[_OPENCONNECTION]], [[_OPENCLIENT]]
* [[_CONNECTED]], [[_CONNECTIONADDRESS]]
* [[Email Demo]], [[Inter-Program Data Sharing Demo]]
* [[IP Configuration]], [[WGET]] {{text|(HTTP and FTP file transfer)}}
* [[Downloading Files]]

View file

@ -10,7 +10,6 @@ The [[_OS$]] function returns the operating system and QB64 compiler bit version
* Allows a BAS program to be compiled with QB64 in Windows, Linux or MacOSX using different OS or language specifications.
* Use the return {{Parameter|compilerVersion$}} to specify the current OS code to use when a BAS program is compiled using another version of the QB64 compiler.
* Windows can use either a 32 (default) or 64 bit compiler. Linux and Mac use 64 bit by default.
<!-- * Explanation by Galleon: http://www.qb64.net/forum/index.php?topic=12193.msg105406#msg105406 -->
{{PageSeeAlso}}

View file

@ -24,12 +24,9 @@ The [[_PRINTSTRING]] statement prints text [[STRING|strings]] using graphic colu
* In SCREEN 0 (text only), [[_PRINTSTRING]] works as one-line replacement for '''LOCATE x, y: PRINT text$''', without changing the current cursor position.
==Availability==
* In versions of QB64 prior to 1.000 _PRINTSTRING can only be used in graphic, 256 color or 32 bit screen modes, not SCREEN 0.''
{{PageExamples}}
''Example 1:'' Printing those unprintable [[ASCII]] control characters is no longer a problem!
''Example 1:'' Printing those unprintable [[ASCII]] control characters is no longer a problem.
{{CodeStart}} '' ''
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(800, 600, 256)
@ -48,38 +45,7 @@ The [[_PRINTSTRING]] statement prints text [[STRING|strings]] using graphic colu
{{OutputEnd}}
''Example 2:'' Making any '''QB64 program window''' larger using a SUB that easily converts PRINT to [[_PRINTSTRING]].
{{CodeStart}}
Scr13& = {{Cl|_NEWIMAGE}}(320, 200, 13) 'this is the old SCREEN 13 image page to set the image
Big13& = {{Cl|_NEWIMAGE}}(640, 480, 256) 'use 4 X 3 aspect ratio that Qbasic used when full screen
{{Cl|SCREEN (statement)|SCREEN}} Big13&
{{Cl|_DEST}} Scr13&
image1& = {{Cl|_LOADIMAGE}}("Howie.BMP", 256)
image2& = {{Cl|_LOADIMAGE}}("Howie2.BMP", 256)
{{Cl|_PUTIMAGE}} (10, 20), image1&, Scr13&
{{Cl|_PUTIMAGE}} (160, 20), image2&, Scr13&
{{Cl|_COPYPALETTE}} image1&, Scr13&
{{Cl|COLOR}} 151: {{Cl|LOCATE}} 2, 4: PRINTS "Screen 13 Height Reduction to 83%"
{{Cl|LOCATE}} 22, 22: PRINTS {{Cl|CHR$}}(24) + " 4 X 3 Proportion" 'use {{Cl|concatenation}}
{{Cl|LOCATE}} 24, 21: PRINTS {{Cl|CHR$}}(27) + " Stretched at 100%" 'instead of a {{Cl|semicolon}}!
{{Cl|_COPYPALETTE}} Scr13&, Big13& 'required when imported image colors are used
{{Cl|_PUTIMAGE}} , Scr13&, Big13& 'stretches the screen to double the size
K$ = {{Cl|INPUT$}}(1)
{{Cl|END}}
{{Cl|SUB}} PRINTS (Text$)
row% = ({{Cl|CSRLIN}} - 1) * {{Cl|_FONTHEIGHT}} 'finds current screen page text or font row height
col% = ({{Cl|POS}}(0) - 1) * {{Cl|_PRINTWIDTH}}("W") 'finds current page text or font column width
{{Cl|_PRINTSTRING}} (col%, row%), Text$
{{Cl|END SUB}} '' ''
{{CodeEnd}}
{{small|Code by Ted Weissgerber}}
: ''Explanation:'' The procedure above creates a larger version of a SCREEN 13 window by stretching it with [[_PUTIMAGE]]. It cannot stretch PRINTed text so [[_PRINTSTRING]] must be used instead. [[LOCATE]] sets the PRINT cursor position for [[CSRLIN]] and [[POS]](0) to read. The SUB then converts the coordinates to graphical ones. Then '''change''' [[PRINT]] to PRINTS using the IDE '''Search Menu'''.
<center>[https://www.dropbox.com/s/tcdik1ajegbeiz4/HOWIE.zip?dl=0 Download of Example 2 Bitmap images]</center>
''Example 3:'' Rotating a text string around a graphic object.
''Example 2:'' Rotating a text string around a graphic object.
{{CodeStart}} '' ''
{{Cl|SCREEN (statement)|SCREEN}} 12 '' ''
{{Cl|DIM}} row {{Cl|AS}} {{Cl|INTEGER}}, cnt {{Cl|AS}} {{Cl|INTEGER}}, cstart {{Cl|AS}} {{Cl|SINGLE}}, cend {{Cl|AS}} {{Cl|SINGLE}}

View file

@ -26,7 +26,7 @@
{{Parameters}}
* Relative coordinates to a previous graphical object can be designated using [[STEP]] as opposed to literal surface coordinates (version '''1.000''' and up).
* Relative coordinates to a previous graphical object can be designated using [[STEP]] as opposed to literal surface coordinates.
* Coordinates ''dx'' and ''dy'' map the box area of the [[_DEST|destination]] area to use. When omitted the entire desination area is used. If only one coordinate is used, the source is placed with its original dimensions. Coordinates can be set to flip or resize the image.
** {{Parameter|dx1}} = the column coordinate at which the insertion of the source will begin (leftmost); when larger than ''dx2'', reverses image.
** {{Parameter|dy1}} = the row coordinate at which the insertion of the source will begin (topmost); when larger than ''dy2'', inverts image.
@ -39,7 +39,7 @@
** {{Parameter|sy1}} = the row coordinate of the upper-most pixel to include of the source. When omitted, the entire image is used
** {{Parameter|sx2}} = the column coordinate of the right-most pixel to include of the source. Can be omitted to get rest of image.
** {{Parameter|sy2}} = the row coordinate of the bottom-most pixel to include of the source. Can be omitted to get rest of image.
* ''_SMOOTH'' applies linear filtering ('''version 1.000 and up''').
* ''_SMOOTH'' applies linear filtering.
<center>'''Note: The [[PUT (graphics statement)|PUT]] options PSET, PRESET, AND, OR and XOR are not available with _PUTIMAGE. QB64 can use [[_ALPHA|transparency]] of colors to achieve the same results.'''</center>
@ -82,13 +82,11 @@
{{CodeStart}} '' ''
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32)
{{Cl|CLS}} , {{Cl|_RGB}}(0, 255, 0)
i = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''') 'see note below examples to get the image
i = {{Cl|_LOADIMAGE}}('''"QB64.PNG"''')
{{Cl|_PUTIMAGE}} (0, 0), i ' places image at upper left corner of window w/o stretching it
'' ''
{{CodeEnd}} '' ''
: ''Explanation:'' When QB64 loads a 256 color .PNG file containing a transparent color, that color will be treated as transparent when _PUTIMAGE is used to put it onto another image. So actually, you can use a 256-color .PNG file containing transparency information in a 256 color screen mode in QB64.
''Example 3:'' Flipping and enlarging an image with _PUTIMAGE by swapping or increasing the desination coordinates.
{{CodeStart}} '' ''
@ -127,7 +125,6 @@ K$ = {{Cl|INPUT$}}(1)
{{Cl|END}} '' ''
{{CodeEnd}}
{{small|Adapted from code by Darth Who}}
<center>''Note:'' The ''QB64.PNG'' Bee image used can be copied from the top of the [http://www.qb64.net/forum/index.php Main Forum Page]</center>
''Example 4:'' Using _PUTIMAGE to scroll a larger image created on a separate [[_NEWIMAGE]] screen page with QB64.
@ -157,7 +154,7 @@ DO
{{Cl|CASE}} "6": x = x + 10: {{Cl|IF...THEN|IF}} x > 1280 {{Cl|THEN}} x = 1280
{{Cl|CASE}} "8": y = y - 10: {{Cl|IF...THEN|IF}} y < 0 {{Cl|THEN}} y = 0
{{Cl|CASE}} "2": y = y + 10: {{Cl|IF...THEN|IF}} y > 720 {{Cl|THEN}} y = 720
{{Cl|CASE}} {{Cl|CHR$}}(32): {{Cl|SYSTEM}}
{{Cl|CASE}} {{Cl|CHR$}}(27): {{Cl|SYSTEM}}
{{Cl|END SELECT}}
{{Cl|_DISPLAY}}
{{Cl|LOOP}} '' ''

View file

@ -23,7 +23,7 @@ The [[_RESIZEHEIGHT]] function returns the user resized screen pixel height if [
s& = {{Cl|_NEWIMAGE}}(300, 300, 32)
{{Cl|SCREEN}} s&
bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'QB64's bee from http://www.qb64.net/qb64_trans.png
bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image
{{Cl|DO}}
{{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN

View file

@ -23,7 +23,7 @@ The [[_RESIZEWIDTH]] function returns the user resized screen pixel width if [[$
s& = {{Cl|_NEWIMAGE}}(300, 300, 32)
{{Cl|SCREEN}} s&
bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'QB64's bee from http://www.qb64.net/qb64_trans.png
bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image
{{Cl|DO}}
{{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN

View file

@ -24,7 +24,7 @@ The [[_RESIZE]] function returns true (-1) when a user has attempted to resize t
s& = {{Cl|_NEWIMAGE}}(300, 300, 32)
{{Cl|SCREEN}} s&
bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'QB64's bee from http://www.qb64.net/qb64_trans.png
bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'replace with your own image
{{Cl|DO}}
{{Cl|IF}} {{Cl|_RESIZE (function)|_RESIZE}} THEN
@ -36,7 +36,7 @@ bee& = {{Cl|_LOADIMAGE}}("qb64_trans.png") 'QB64's bee from http://www.qb64.
{{Cl|CLS}}
'Center the QB64 bee image:
'Center the image:
x = {{Cl|_WIDTH (function)|_WIDTH}} / 2 - _WIDTH(bee&) / 2
y = {{Cl|_HEIGHT}} / 2 - _HEIGHT(bee&) / 2
{{Cl|_PUTIMAGE}} (x, y), bee&

View file

@ -52,7 +52,7 @@ DO
{{Cl|_DISPLAY}}
{{Cl|LOOP}} {{Cl|UNTIL}} a& = 0 '' ''
{{CodeEnd}}
: ''Explanation:'' The [[POINT]] value minus [[_RGBA]](1, 1, 1, 0) subtracts a small amount from the bright white color value so that the top [[_SETALPHA]] color range will not affect the [[_CLEARCOLOR]] transparency of the bright white PNG background. [http://www.qb64.net/qb64_trans.png qb64_trans.png].
: ''Explanation:'' The [[POINT]] value minus [[_RGBA]](1, 1, 1, 0) subtracts a small amount from the bright white color value so that the top [[_SETALPHA]] color range will not affect the [[_CLEARCOLOR]] transparency of the bright white PNG background.
{{PageSeeAlso}}

View file

@ -10,7 +10,6 @@ The [[_SNDCOPY]] function copies a sound to a new handle so that two or more of
* Returns a new handle to the a copy in memory of the sound data referred to by the source handle.
* No changes to the source handle (such as a volume change) are inherited.
* The sound data referred to by the handle and its copies are not freed until all of them are closed.
* In versions '''prior to build 20170811/60''', the sound identified by {{Parameter|handle&}} must have been opened using the [[_SNDOPEN|"SYNC" capability]] to use this function.
{{PageSeeAlso}}