Join us on Discord!
You can help CodeWalrus stay online by donating here.

HP Prime Projects

Started by alexgt, April 17, 2015, 06:36:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alexgt

Quote from: DJ Omnimaga on July 30, 2015, 04:20:36 PM
Wait, it treats line breaks as semicolons? If it wasn't for certain lines of code not using a semi-colon at the end (eg IF instructions), then you could have made your program add line breaks at the end of semicolons.


Also, for your hockey game, something I thought that would be cool is if you tried making an actual hockey game but with 2 players on each side, one controled by the AI unless you switch to it. You could also make the field of play 3D mode-7-like like in Mac Bernicks's Trailblazer game.
That could work.

But to clarify the semicolon thing (I think but do not know) but the only time you don't need a semicolon is before the final END; statement in the loop, if branch, function, ect. :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Wait, do you mean the last command before an END doesn't need a semi-colon? That would be a bit inconsistent.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Snektron

Quote from: alexgt on July 05, 2015, 02:59:54 PM
Yeah I am focusing on MinePrime now (I have to look into the AI system learning and stuff, also I am dreading the program editor O.O) Does anybody know a way of detecting a new line in a string?

A:=1; //this is fine just look for the semicolon
If A==1 then //look for then
A:=2 //this doesn't need a semicolon to compile corectly so I can't detect when to make a new line :(
end; //this line and the previous line will get smooshed together because of the lack of the semi colon


The general ascii code for the newline character is byte 10 ('\n'). I don't know if the prime honours the ascii standard though :P
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Doesn't the prime use Unicode?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Unicorn

Unicode - also known as unicorn-code :P
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Snektron

Quote from: DJ Omnimaga on August 15, 2015, 07:13:21 PM
Doesn't the prime use Unicode?

I think the first 256 characters of unicode are the same as the ascii characters.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


JosJuice

Quote from: Cumred_Snektron on August 16, 2015, 10:17:25 AM
Quote from: DJ Omnimaga on August 15, 2015, 07:13:21 PM
Doesn't the prime use Unicode?

I think the first 256 characters of unicode are the same as the ascii characters.

Yes, or more technically: The first 256 characters of Unicode are the same as the 256 characters in ISO-8859-1, and the first 128 characters of ISO-8859-1 are the same as the 128 characters in ASCII.
  • Calculators owned: TI-84+ SE, Casio fx-CG10

Dream of Omnimaga

Ah, right. Thanks for the info. Are those first characters as large as the rest of the unicode characters when in unicode mode?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

alexgt

Quote from: DJ Omnimaga on August 12, 2015, 05:09:48 PM
Wait, do you mean the last command before an END doesn't need a semi-colon? That would be a bit inconsistent.
Yup, but I only exclude it on mock up test programs
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

I would recommend including it in public program releases anyway, in case future OS updates patch this.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

alexgt

That is what I do but I don't think it is a bug that necessarily needs patching
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Snektron

Quote from: DJ Omnimaga on August 17, 2015, 06:24:59 PM
I would recommend including it in public program releases anyway, in case future OS updates patch this.

the ; is probably only there as a marker that the expressoin has ended. Since an 'END' token is not allowed in a mathematical expression, the compiler knows the expression has ended anyway.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


alexgt

^ That is probably how it works
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Quote from: alexgt on August 17, 2015, 06:35:22 PM
That is what I do but I don't think it is a bug that necessarily needs patching
Indeed. I'm just suggesting as a precaution, in case HP does it anyway, because it would suck if your games stopped working completely just because of a missing semicolon at the very end of the code. Thanks Cumred for explaining by the way :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

alexgt

I could make it part of the SIFS program editor that when you exit it inserts semi colons where it is needed :).
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Powered by EzPortal