superstrick
BlitzMax Forums/BlitzMax Programming/superstrick
| ||
this wee bit of code wont compile, and tbh iv never really read up on extern much I got this from another post so dont fully understand whats wrong with it. or what strict dont like about it.Extern "win32" Function SystemParametersInfo2(uiAction, uiParam, pvParam$z, fWinIni) = "SystemParametersInfoA@16" End Extern |
| ||
Extern "Win32" Function SystemParametersInfoA:Int(uiAction:Int, uiParam:Int, pvParam:Byte Ptr, fWinIni:Int) End Extern Try this. |
| ||
SuperStrict insists that variables and functions have an explicit type, even for integers. You can use % or :Int.Function SystemParametersInfo2%(uiAction%, uiParam%, pvParam$z, fWinIni%) = "SystemParametersInfoA@16" Edit: I'm too late by nine seconds! Last edited 2011 |
| ||
I actually tried that given the error is a missing type specifier Function SystemParametersInfo2:int(uiAction, uiParam, pvParam$z, fWinIni) = "SystemParametersInfoA@16" I get same error with the above. |
| ||
The code in post #5 still does not have identifiers for the function parameters. As said before, these are mandatory in SuperStrict mode. |
| ||
Ah now I get it. Last edited 2011 |
| ||
You should always use SuperStrict mode anyway. |
| ||
You should always use SuperStrict mode anyway. ...unless you don't want to. Strict is "strict" enough. |
| ||
As far as I know it's the fastest and also the most readable mode, therefore I always use it. Of course this is also a question of personal preferences I guesss : ) |
| ||
There are only two modes, strict and rubbish. Strict and superstrict are just varients where one has a shortcut. Or superstrick as it's sometimes known. |