Un-documented Commands

BlitzPlus Forums/BlitzPlus Programming/Un-documented Commands

Timjo(Posted 2009) [#1]
Not a specific proramming problem, but:

Does anyone know where I can find details of the remaining un-documented commands in BlitzPlus?
I have the lastest versions of both BlitzPlus & the docs pack, but there still seem to be some commands not even listed in the help sections.
I often see commands used in this forum that I am unaware of which are standard BlitzPlus commands - not userlib stuff. (restorewindow for instance)
Any links appreciated. Thanks.


_Skully(Posted 2009) [#2]
Are you at the latest update?


blackgecko(Posted 2009) [#3]
I can give you the german online help if you understand german:
Click here
Some undocumented commands I remain at the moment:
RestoreWindow, PauseTimer, ResumeTimer, ResetTimer, TimerTicks, AutoSuspend, CreateProcess, Object, Handle, DebugObjects, GadgetFont, RuntimeStats, MoreFiles.


Timjo(Posted 2009) [#4]
Yep, I have the latest updates - but still some commands appear not to be listed????
I guess they just haven't got round to it, and probably never will.
I just wondered if anyone had done their own documentation of the new commands.


Mahan(Posted 2009) [#5]
Let me get a try at this:

<html>
<body>
RestoreWindow - (re)-Stores a previously stored window to a stream.

PauseTimer - Pauses the processor clock. Argument is the core # to pause. (not recommended on single core systems)

ResumeTimer - Starts the processor clock again. (works only on single processor systems, BlitsPlus is single-threaded, remember?)

ResetTimer - Resets the MilliSecs()-timer

TimerTicks - Makes the MilliSecs()-timer make a "tick"-sound in the PC-beeper each time the value is incremented.

AutoSuspend - Suspends the system automatically, at random times.

CreateProcess - Returns an image of an UML-process chart.

Object - This is like an "Angry" Notify! This is the way for your program to strongly object to the user.

Handle - Handles issues that cannot be accessed trough other commands. Example: Handle "Garbage", or : Handle "Laundry"

DebugObjects - Automatically convert all the bad guys (or bugs in L337-speak) into good guys.

MoreFiles - Creates a few test-files with random data somewhere on your harddrive. Arguments are <min_size%>, <max_size>

</body>
</html>

I have no idea what GadgetFont, RuntimeStats do, so feel free to add them, if you know.


blackgecko(Posted 2009) [#6]
@Mahan: I don't think you're right with your commands descriptions. Let me try it:

RestoreWindow window - after having maximized or minimized a window this command restores it.
PauseTimer timer - Pauses a Timer, created with CreateTimer()
ResumeTimer timer - Resumes a timer, paused with PauseTimer
ResetTimer timer - resets a timer back to 0
TimerTicks(timer) - returns the "ticks" of a timer
AutoSuspend value - if the value is 1, the program will be paused while another window is selected.
CreateProcess(file$) - works like Execfile, but returns a stream handle
Object and Handle - 2 commands to work with types, I didn't really understand the meaning up to now.
DebugObjects - Lists all currently used objects in the debuglog
MoreFiles(direction) - direction is a Direction handle, determined with ReadDir(). If the returned value is 1, there are more files which have not been read out with NextFile yet.
SetGadgetFont Gadget, Font - changes the font of a gadget
GadgetFont(Gadget) - returns the font of a gadget
RuntimeStats - similar to DebugObjects

bye


Mahan(Posted 2009) [#7]
Oh, gee. No wonder i couldn't get MoreFiles to work :)

Let me describe Object and Handle to you (the real description this time):

Type MyType ; create a type
  Field myValue
End Type

Local mine.MyType = New MyType ; I just instantiated a MyType and called it "mine"

mine\myValue = 15

;How do I do if I temporarily want to keep a "handle" to "mine" in an integer?

a%=Handle(mine) ; now "a" holds a "handle" to mine

mine = Null ; ooops, I forgot the "mine" instance

;Good i still remember a "handle" to "mine" in the variable "a", but how can i make it an real object again?

Local mineAgain.MyType = Object.MyType(a) ; I make it an object reference again!

Print "mineAgain\myValue = " + mineAgain\myValue ; TADA!!! :-)


Print "Press <enter> to exit"
Input() 



Hope it helped.


Timjo(Posted 2009) [#8]
Thanks for the input, Bart & Mahan.
Just as a final thought, would you recommend upgrading to BlitzMax?
Would it be difficult to migrate from BlitzPlus? Pros & Cons...
Thanks again for the help above.


Dabhand(Posted 2009) [#9]

Just as a final thought, would you recommend upgrading to BlitzMax?



Yes


Would it be difficult to migrate from BlitzPlus?



Not really, some of the syntax has changed, but after a couple of days of playing, it'll be pretty familiar.


Pros & Cons...



The list is a mile long on the pros, not many cons... Download the demo and have a try yourself, have a gawp at the samples etc etc

You'll see for yourself then

If you do buy it, make sure your next purchase is Ziggy's Blide: http://www.blide.org/

Dabz


Mahan(Posted 2009) [#10]

Just as a final thought, would you recommend upgrading to BlitzMax? [...] Pros & Cons...



Pros:
bmx is faster
bmx is more open (the libs ... you can see them!)
bmx has OOP (Object Oriented Programming), reflection, threads, streams etc. If you learn these features, you will be much more attractive on the software developer job-market.
bmx provides better encapsulation. (it has not got full OOP data hiding yet, though (private, public etc))
bmx supports pointers and function-pointers. Allows for an much more elaborate programming style.
bmx has lots of more libs, and you can use DLL's for real
bmx is BRLs latest product. It gets all focus when it comes to new features.

Cons:
B+ is easier to master.
B+ is a bit faster to write very small projects in. (less complexity with underlying object-model). disclaimer: This is my own opinion.
B+ has very good compatibility with really old hardware. (in 2D mode).
B+ compiles faster.


Would it be difficult to migrate from BlitzPlus?



BRL has made it quite easy because they have written functions that allow you to access a lot of the goodies (that are OOP) as they would be old-style basic commands. To migrate to this is very easy.

Learning OOP for real so you start getting the edge of the language and do it instinctively and intuitively takes ~6 months if you're an average procedural developer from the beginning (again my own estimation) if you write programs daily.

Feel free to ask more if my answers led you to more questions :-)


Dabhand(Posted 2009) [#11]
Additions to Mahan's list

Pro's

Realtime rotation/scaling/alpha, no pre-drawing manipulated images and storing them away for later
Quick access to specific graphic drivers DX7, OpenGL and DX9 (DX9 with a free 3rd party module)
Support for the Ogg-Vorbis sound format (Totally kicks MP3 into touch)
Crossplatform
Ability to plugin C/C++ code within your build
Maps for storing data
MaxGUI module has a lot more features than its Blitz+ counterpart, though, there are better modules out there if your serious about application development
Huge list of 3D engines and that plug into BlitzMax with very little hassle via modules, a good few of them are free too.

Cons
For what it is, B+ has a more complete set of documentation than Blitzmax, though, all the infomation is there, you will be using the sites search feature more

Dabz


Mahan(Posted 2009) [#12]
If you decide to stay with BlitzPlus for a while I highly recommend the IDEal IDE (it's made for BlitzPlus and Blitz3D). It really helps much from the start but once your program grow to several files it's indispensable. (it's freeware now also, so there it absolutely no reason not to try it imo)


Timjo(Posted 2009) [#13]
Many, many thanks for all that info, Dabhand & Mahan. It's really appreciated.

I shall definately consider buying BlitzMax - will try the Demo first.

Thanks...Tim.