Hi@all
It would be nice, if PureBasic does support more operators, like the muldo-operator (4%3 = 1 Or 4%2 = 0) Or 5^2 = 25(like Pow())
And functions to call for example the Com-Port or the USB-Ports...
That would make PureBasic more special, or do you know any other languages wich support such things that easily?
[Implemented] Operators
[Implemented] Operators
Hello World
Re: Operators
PureBasic can do modulo and power functions, but not as operators.
Examples can be found in the FAQ here or searching these forums.
They might be easier to use as operators but there's no need to go
to another language when PureBasic is more than capable of doing
them.
Examples can be found in the FAQ here or searching these forums.
They might be easier to use as operators but there's no need to go
to another language when PureBasic is more than capable of doing
them.
An ASM and "pure" PureBasic mod function included in Matthew's Fishlib..
http://www.purebasic.org/comments.php?id=P8_0_1_0
http://www.purebasic.org/comments.php?id=P8_0_1_0
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Hi!
That´s very nice that this operator will be added!
But what is with the COM-Functions?
Could they be added, too?
Even if I don´t need them now, it would be very nice to see them!
And i´ve found a little thing wich should be fixed, too:
Why this isn´t working?
I get the error-message: Can´t assign a value to a structure
Or have I done a mistake?
That´s very nice that this operator will be added!

But what is with the COM-Functions?
Could they be added, too?
Even if I don´t need them now, it would be very nice to see them!
And i´ve found a little thing wich should be fixed, too:
Code: Select all
Procedure EnableShutDownNT()
hToken.l
mLUID.LUID
mPriv.TOKEN_PRIVILEGES
mNewPriv.TOKEN_PRIVILEGES
OpenProcessToken_(GetCurrentProcess_(),#TOKEN_ADJUST_PRIVILEGES + #TOKEN_QUERY,hToken) ;Constants aren´t predeclared(32,8)
LookUpPrivilegeValue_("","SeShutdownPrivilege",mLUID)
mPriv\PrivilegeCount = 1
mPriv\Privileges[0]\Attributes = #SE_PRIVILEGE_ENABLED
mPriv\Privileges[0]\Luid = mLUID ;This isn´t allowed in PB
AdjustTokenPrivileges_(hToken, False, mPriv, 4 + (12 * mPriv\PrivilegeCount), mNewPriv, 4 + (12 * mNewPriv\PrivilegeCount))
EndProcedure
I get the error-message: Can´t assign a value to a structure
Or have I done a mistake?
Hello World
Must be something wrong, here is a working version
viewtopic.php?t=3808&highlight=shutdown
viewtopic.php?t=3808&highlight=shutdown