Page 3 of 6

Posted: Tue Nov 22, 2005 12:01 pm
by nco2k
@va!n

Code: Select all

OpenScreen(lWidth, lHeight, lDepth, cTitle$, [#Flags]) ;#PB_Windowed
no no no, i like the way due OpenWindowedScreen() because of various reasons.

and for the other stuff, an extra command would be nice, like SetFrameRate() for example SetAntiAliasing(), SetBufferingMode() etc. or something like that. if you want to change it during the game, for some reason (user request), then it would be way too ugly to close the screen and call again OpenScreen(lWidth, lHeight, lDepth, cTitle$, [#Flags]) because there would be no other way to do so.

Code: Select all

OpenScreen(..., #PB_AntiAliasing4x)
Delay(10000)
CloseScreen()
OpenScreen(..., #PB_AntiAliasing2x)

Code: Select all

OpenWindow() : OpenWindowedScreen()
SetAntiAliasing(4x)
Delay(10000)
SetAntiAliasing(2x)
its good to keep such commands seperated and so their possibilities wide open. :wink:

c ya,
nco2k

Posted: Tue Nov 22, 2005 7:44 pm
by va!n
@nco2k:
sorry.... it was a small mistake frome me... sure i dont want leave nor change the OpenWindowedScreen command! So the #PB_Windowed has been removed in my list and so an optional parameter for

OpenScreen(lWidth, lHeight, lDepth, cTitle$, [#Flags])

would be nice...! Ofcourse no modifying of OpenWindowedScreen! Was a small mistake by in the hurry.. sorry ;)

Re: Wishlist for PureBasic v4.0 - Overview

Posted: Thu Nov 24, 2005 12:54 pm
by Dr. Dri
akee wrote:

Code: Select all

  var.b    ;  8 bits int
  var.w    ; 16 bits int
  var.l    ; 32 bits int
  var.q    ; 64 bits int
  
  var.ub   ;  8 bits unsigned int
  var.uw   ; 16 bits unsigned int
  var.ul   ; 32 bits unsigned int
  var.uq   ; 64 bits unsigned int
  
  var.f    ; 32 bits float
  var.d    ; 64 bits float 
  var.ld   ; 80 bit float (long double)   <--- for the huge scientific applications ;)
  
  var.s    ; ansi string  / character (maybe var.c !?)
  var.u    ; unicode string / character 
 
i agree, but asm 80 bit float is "tword"
var.t for 80 bit float ??? (a 'one letter' type like the others)

Dri

Posted: Thu Nov 24, 2005 7:13 pm
by va!n
- Some standard basic Keywords like: Abs() for integers, best way two functions: Abs() & AbsF() ... Atan2(), Exp(), Pi() , Sgn() , MOD, NOT, XOR

has been added to the overview wish list..

Posted: Thu Nov 24, 2005 8:24 pm
by Nik
Can't the normal Abs() function use integers too?

Posted: Fri Nov 25, 2005 12:30 am
by chris319
- comment blocks starting with /* and ending with */
Please make them nestable.
- Len() extended to support optional max length argument, and if not already so, make Len() internally limit to max PB string length if no max length is given by the programmer.
Does this float your boat?

Code: Select all

var.s32
... results in a 32-character string.
Will it be still a basic language ?
Why should it start now? :wink:

Posted: Fri Nov 25, 2005 12:47 am
by chris319
Here are some suggestions I posted to another BASIC board, all of them standards-compliant. Take your pick.
Here are some ideas for math functions. They are excerpted from the ANSI/ISO standard for BASIC (yes, there is a standard for BASIC).

CEIL(X) The smallest integer not less than X.
---------------------------------------------------------
Here is a line of code where I could have used CEIL:

bytespersample = samplebits / 8 + ((samplebits / 8) - int(samplebits / 8))

could have been written as

bytespersample = CEIL(samplebits / 8)
---------------------------------------------------------

IP(X) The integer part of X, i.e. SGN(x) * INT(ABS(X)).

FP(X) The fractional part of X, i.e., X - IP(X).

LOG10(X) The common logarithm of X; X shall be greater than zero.

LOG2(X) The base 2 logarithm of X; X shall be greater than zero.

MOD(X,Y) X modulo Y, i.e., X-Y*INT(X/Y). Y shall not equal zero.

PI The constant 3.14159...

ROUND(X,N) The value of X rounded to N decimal digits to the right of the decimal point (or -N digits to the left if N < 0); i.e., INT(X*10^N+.5)/10^N.

SGN(X) The sign of x: -1 if X < 0, 0 if X = 0, and +1 if X > 0.

TRUNCATE(X,N) The value of X truncated to N decimal digits to the right of the decimal point (or -N digits to the left if N < 0); i.e., IP(X*10^N)/10^N.

Note: IP() is not the same as INT(). Here is the definition of INT(X):

"The largest integer not greater than X; e.g., INT(1.3) = 1 and INT(-1.3) = -2." IP(-1.3) would return 1.

Posted: Sun Nov 27, 2005 10:37 am
by Psychophanta
Chris, some of your requested things are already implemented, just read help and use PB :)

I see something is forgotten:
Replace Pow() by ^ operand.
^ operand is tipical in all basics

Posted: Sun Nov 27, 2005 6:53 pm
by Shannara
What "standard"? You have to remember that Purebasic have separated from the BASIC language quite a few versions ago :)

Posted: Thu Dec 01, 2005 1:39 am
by chris319
Chris, some of your requested things are already implemented, just read help and use PB
Right. I said that message was posted to another board (Liberty Basic) and to take your pick.
I see something is forgotten: Replace Pow() by ^ operand. ^ operand is tipical in all basics
It gets my vote. I could come up with a long list of ways I wish PB were more like ANSI Basic but I'm not about to start a campaign to reform PureBasic. It is what it is.
What "standard"? You have to remember that Purebasic have separated from the BASIC language quite a few versions ago
There IS an ANSI/ISO standard for BASIC, as well as for C, Pascal and several other languages. Standards are useful when it comes to portability. Once you've ported several programs from one idiosyncratic BASIC dialect to another, you'll come to appreciate the concept of portability. :wink:

Posted: Fri Dec 02, 2005 5:30 pm
by remi_meier

Code: Select all

test = NewList.l

AddElement(test, 55)

Dim a(50)
a(1) = NewList.l

Code: Select all

Try - Catch
Is closer to the line which causes an error than OnError lib or at least make OnError lib cross plattform.
I would like to see (I know that's not for everybody) that arrays start with 0 and go to max-1. So 'Dim a(4)' is from 0 to 3. Easier to convert code, standard and 'Dim a(0)' would really clean up the array.

greetz
Remi

Posted: Fri Dec 02, 2005 10:16 pm
by Shannara
chris319 wrote:
What "standard"? You have to remember that Purebasic have separated from the BASIC language quite a few versions ago
There IS an ANSI/ISO standard for BASIC, as well as for C, Pascal and several other languages. Standards are useful when it comes to portability. Once you've ported several programs from one idiosyncratic BASIC dialect to another, you'll come to appreciate the concept of portability. :wink:
I am actually doing that between Visual Basic, iBasic, and Pure Basic. I wouldnt call any of them idiosyncratic ... but whatever ;) For BASIC langauges, I agree. But I would hardly call Pure Basic of the BASIC area. :)

Posted: Sun Dec 04, 2005 1:33 am
by Joakim Christiansen
And don't forget a inbuilt script engine... :)

Posted: Sun Dec 04, 2005 3:30 pm
by Nik
hopefully thats a joke :D

Posted: Sun Dec 04, 2005 5:14 pm
by Joakim Christiansen
Nik wrote:hopefully thats a joke :D
No I mean it, and I know it's suggested before.
It would be a very cool feature, but it can wait.