Forum Replies Created
-
AuthorPosts
-
What are you trying to do? For the QWERTY keyboard the 2 and the @ key are the same Key. KeyHit detects the key not the Character. You might be able to use KeyDown For key.LeftShift and KeyHit for Key.key2 in the same comparison for the @ key. Not sure haven’t tried it myself. I am not sure but I believe there is a getChar instruction that would be able to do that for you instead but Depends on what you are doing.
I like it. What it says is catchy and the monkey/image logo is really good. Maybe add some type of a more artistic font for the descriptive.
That’s interesting. Never delved deep enough to notice that.
Thats pretty good. Now all you need is “SAL”.
try this video if you have time:
I don’t know. Mark might have to answer that. I don’t think he has it integrated in the language and I don’t know if he would be willing to add it.
on another note, here is a little bit of code to kind of explain what I said before:
[/crayon]Monkey123456789101112131415161718192021222324[crayon-5cb9bc4e2ecbc746512656 inline="true" ]Namespace myapp#Import "<std>"Using std..Function Main()Local a:UByte = 255Local b:Byte = -1Local c:String = ""For Local n:Int = 0 Until 8If (a & (1 Shl n)) c = "1"+c' shl = shift leftNextPrint "this is unsigned byte 255 in binary =" +cc = ""For Local n:Int = 0 Until 8If (b & (1 Shl n)) c = "1"+cNextPrint "this is singed byte -1 in binary = " + cPrint a+" " + bEnd[edited]
had the representation of the math backwards.Yea my fault something like that. I believe it goes down to -128.
a signed bite only goes upto 128 and down to -128 which is the first 7 bits and are used as the number and the last bit “on” for negative and “off” for positive. if you pass a number greater than 128 it sets the last bit to on and therefore it returns a negative number and will be a completely different number that you passed as interpreted by the compiler.
in a signed byte a negative 1 in a byte binary equals 11111111 and in an unsigned byte the 11111111 is equal to 255. The last bit of a signed byte will always be used to represent whether the number is positive or negative. and that goes back all the way to the original assembly language.
Dude, I know how to read. Thats what I did and it worked fine. I tried it max size medium and small it worked fine with all.
Works fine here as well. 2013 MacBook Air, OS Sierra and the latest Monkey 2.
Yue, You should try this code in BlitzMax:
[/crayon]Monkey1234[crayon-5cb9bc4e3a4ee529776459 inline="true" ]Local a:Byte = -2Print a@yue if you have time watch this video:
cambia las opciones the subtitulos a “autoTranslate ->Spanish”.Que? Hahaha!
Si necesitas ayuda, posiblemente te pueda ayudar. Ultimamente no he tenido tiempo para dedicar a la programación pero cuando pueda lo hare.Mi español no es muy bueno pero ojalá y te sirva en algo.
Suerte!
Desde EEUU, Colorado.
Poor @yue you have no forum home
and even though this thread to me is out of place, I don’t think there will be any objections with anybody you posting any of that here. Hope you hang around here and try to learn Monkey2. I am not a 3D programmer but several others here are. They might help you with your projects if you decide to switch.
And yea I understand where you are coming from. I too had a disagreement with the same administrator(not in SyntaxBomb), by which his response kind of went in to the deep end. I just decided not to deal with him and is another reason why I haven’t tried to register in his forum. It was nothing important and I really have no need to join his forum so I just stay here.
It seems Mark forgot to remove the debug stop when testing. post the issue In GitHub. I am sure he’ll fix that as soon as he can.
-
AuthorPosts