Search found 46 matches

by PedroMartins
Fri Apr 06, 2018 3:41 pm
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Debugger

Instruction/Procedure: Debug()

Example:



Define x.d = 10
Define y.d = 0
Define a.d = 0

y = x / y ; Works correctly.

;a = 1.0 / a ; Invalid memory access.

; the problem is that you have to convert the float to
; double again because the result variable a is double. :)
a ...
by PedroMartins
Fri Apr 06, 2018 3:33 pm
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Enumerations

Instruction/Procedure: Enumeration

Example:


EnableExplicit
;**********************************************************************************************************************
; FUNCTIONS ...
by PedroMartins
Fri Apr 06, 2018 1:46 pm
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Gadget

Instruction/Procedure: ScrollAreaGadget()

Based on program from user: Rashad

Example:



Enumeration
#Win
#Panel
#Scrl
#Canv
EndEnumeration

Global scrollgadget_width=376 ; it works if you change to this
;Global scrollgadget_width=200 ; it works if you change to this
Global ...
by PedroMartins
Fri Apr 06, 2018 11:41 am
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Module

Instruction/Procedure: DeclareModule

Example:


;*************************************************
; PROJECT DATA
;*************************************************
; Project name: Module mbox
; Project works on: Windows 7 ...
by PedroMartins
Fri Apr 06, 2018 11:26 am
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: String

Instruction/Procedure: ValD()

Example:

Code: Select all


Define a.d
Define b.d = 0.0

a = ValD(StrD(1.0)) / b

Debug("a: "+a)

by PedroMartins
Fri Apr 06, 2018 11:23 am
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Camera

Instruction/Procedure: CreateCamera()

Example:


InitEngine3D()
InitSprite()

OpenWindow(0, 0, 0, 800, 600, "Player 1 versus Player 2", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 800, 600, 0, 0, 0)

; Light
CreateLight(#PB_Any, RGB ...
by PedroMartins
Fri Apr 06, 2018 11:22 am
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Basic Keywords

Instruction/Procedure: For

Example:

Code: Select all

Define i

For i = 0 To 10
  Debug(i)
Next i
by PedroMartins
Fri Apr 06, 2018 11:16 am
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Re: Project "Give a Pure Example"

Section: Window

Instruction/Procedure: CloseWindow()

Example:



Define quit=0

If OpenWindow(0, 0, 0, 300, 150, "my window", #PB_Window_SystemMenu+#PB_Window_ScreenCentered)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow ;press the red button in window
quit=1
EndSelect
Until ...
by PedroMartins
Fri Apr 06, 2018 10:32 am
Forum: General Discussion
Topic: Project "Give a Pure Example"
Replies: 12
Views: 4195

Project "Give a Pure Example"

Hi, my name is Pedro Martins, and today 05-04-2018,
i've started this project to help every purebasic fan out there.

TOPIC RULES:
1º This topic is for posting working examples ONLY .
2º Yes i know that i can get examples in the rest of the forum. So go and get them.
3º This is just a topic for ...
by PedroMartins
Thu Apr 05, 2018 8:55 pm
Forum: Feature Requests and Wishlists
Topic: Vector Lib output without interpolation
Replies: 19
Views: 5904

Re: Vector Lib output without interpolation

*** to Administrator: please delete this post reply ***
by PedroMartins
Thu Apr 05, 2018 5:09 pm
Forum: Feature Requests and Wishlists
Topic: Vector Lib output without interpolation
Replies: 19
Views: 5904

Re: Vector Lib output without interpolation

*** to Administrator: please delete this post reply ***
by PedroMartins
Thu Apr 05, 2018 1:53 pm
Forum: Coding Questions
Topic: Stores simple states in exe
Replies: 78
Views: 17981

Re: Stores simple states in exe

*** to Administrator: please delete this post reply ***
by PedroMartins
Thu Apr 05, 2018 1:46 pm
Forum: Feature Requests and Wishlists
Topic: Vector Lib output without interpolation
Replies: 19
Views: 5904

Re: Vector Lib output without interpolation

*** to Administrator: please delete this post reply ***
by PedroMartins
Thu Apr 05, 2018 1:05 pm
Forum: Feature Requests and Wishlists
Topic: Vector Lib output without interpolation
Replies: 19
Views: 5904

Re: Vector Lib output without interpolation

*** to Administrator: please delete this post reply ***
by PedroMartins
Wed Apr 04, 2018 12:20 pm
Forum: Coding Questions
Topic: moved this to project "give a pure example"
Replies: 30
Views: 5141

Re: A new messagebox

*** To Administrator: please delete this post reply only ***