.0:
Aussi, j'ajoute le token Return:.0:Return
Comment est-ce que vous arrêter une programme? Le token Stop est le token que l'arrête. :.0:Return
:.LOOP ;un label
:getKey→A ;le pression sur la touche enregistrées dans le var A
:If A=0 ;Vérifie si A est zéro
:Goto Lbl "LOOP ;va au le label "LOOP" s'il n'y a pas un pression de touche
:ClrDraw ;efface l'écran
:Text('0,0,A ;écrit le nombre en le var A dans l'écran
:DispGraph ;affiche l'écran
:Stop ;Arréte la programme
.0:
.0:Return
.0:Return
.LOOP ;un label
getKey→A ;la touche pressée est enregistrée dans la variable A
If A=0 ;Vérifie si A vaut zéro
Goto Lbl "LOOP ;va au le label "LOOP" s'il n'y a pas de touche pressée
ClrDraw ;efface l'écran
Text('0,0,A ;écrit le nombre contenu dans la variable A à l'écran
DispGraph ;affiche l'écran
Stop ;Arrête le programme
.0:Return
ClrDraw
"Hello!→A
Text(0,0,A
DispGraph
Stop
.0:Return
Send(1,"ETest→Z ;Crée un programme en BASIC et en stocke l'adresse dans Z
int(Z,49 ;Cela écrit un octet contenant 49 à l'endroit de la mémoire pointé par Z
Stop
.0:Return
ClrDraw
"Hello!→A
Text(0,0,A
DispGraph
Stop
However, A does not hold the string! A has a pointer to the string. A pointer has a number that points to a spot in RAM. Here is another, more complicated example using pointers:.0:Return
Send(1,"ETest→Z ;Creates a BASIC program variable and stores the location in Z
int(Z,49 ;This writes the byte 49 to the spot in memory pointed to by Z
Stop
Since Z points to the BASIC program, 49 (which corresponds to "1") is written to the first byte of the program. Go ahead :) Open up the program and you will see it has a 1 :)J'ai traduit tout ça et je l'ai ajouté à mon premier post. :)Merci!
Je suis content de voir un tutoriel en français pour grammer. :D Quand il sera fini tu devrais le placer dans la section tutorials ici aussi :D http://www.omnimaga.org/index.php?action=articles;cat=11D'accord :D
Dans ce cas, j'attends celui en français :Dje me suis dis la même chose un jour, mais c'était sur l'Axe Parser. :/
Sinon, si tu veux comprendre pourquoi j'attends celui en français, regarde un peu la tête de celui en anglais... La mise en page n'est pas bien encourageante. (ça vaut pas le tien sur le site du zéro :P )Un peu comme la documentation de l'Axe Parser quand j'ai commencé à apprendre. Dans un an on pourrait peut-être voir un nouveau tutoriel sur le SdZ par persalteas. :D
(il ne marche pas!)
:If A=3 ou C=2:C+1→C:Horizontal C:"BONJOUR"→A
:If A=3: ou C=2
C+1→C:Horizontal C:"BONJOUR"→A
Cette notation peut s'optimiser en getkey(9 sur les TI 84 Plus qui possèdent la fonction getkey(Ce n'est pas vrai. getKey( est les deux tokens getKey et (. Il marche pour tout des OS.
Also, not(6 = not(110b = 001b = 1 =not(0000000000000110b = 1111111111111001b =65529. En effet, 65535-6. Plus general, not(A = 65535-A.All the 16 bits are inverted ? OK, I didn't know.
Deux ou trois posts de supprimés...Oui le serveur d'Omni a manqué de RAM et tout a planté, donc les dernier posts furent corrompus. Il a fait une sauvegarde du 22 avril.
Bref, version actuelle du tuto (passé en PDF ! ) : DERNIERE MISE A JOUR LE 25/04/2012 - 09h51 (http://tiemulation.kegtux.org/Grammer-CommandesEtTutoriel-25_04_2012.pdf)
De manière générale, je vais uploader les mises à jour sur http://tiemulation.kegtux.org/Grammertutorial.htm .
EDIT: Also, since I uprated one of yesterdays posts that got lost, I uprated your last post
Ans and Ɵ' are put back to normal when the error handlerDo you mean they come back to 0 when the program arrives to the specified label ?
completes.
1) Where do you find the "solve(" command in the menus ? The [math][0] gives me a "Misc(" command. Is that from Grammer, or from MirageOS (or from XtraTkn ?)Ah, yes, you have the Token Hook enabled (it changes the names of some tokens). It still does the same thing, though.
2) about solve(3.I mean that they are preserved, or restored. This way, if your error handler changes Ans or Ɵ', it won't effect the program.QuoteAns and Ɵ' are put back to normal when the error handlerDo you mean they come back to 0 when the program arrives to the specified label ?
completes.
3) Explain solve(4 ... :/:) solve(4 will automatically cause an error. For example, solve4,0 causes an ON error, solve(4,1 causes a Memory error, solve(4,2,"String" creates a custom error. This is good for custom error handling. I attached a screenshot :)
4) Explain how works the duration with the conj( command... :/ 64, for me, it's just Minecraft...If you use 64, it makes it take a long time. Try using 16 instead? (or smaller values).
solve(4,2,"String" creates a custom error.AAWWW YEAH !! Powerful !
1) What is the "Gray" method for displaying sprites ? ( Pt-On(7 ) Do you explain it in the topic about grayscale ? If yes, don't answer, I'll see.You form the sprite data like the MASK version, except it is gray byte, black byte, gray byte, black byte, et cetera. It lets you draw gray sprites without using two buffers (but you need to constantly draw the sprite and update the screen).
2) You told talk several times about buffers to display. I didn't know that we could create custom buffers at custom adresses. I heard about the buffer and the backbuffer in Axe, but that's all. It's not very limpid, can you re-explain me what is exactly a buffer and how it works ?A buffer can be any area of RAM that you work with for storing data. For example, the particle buffer and drawing buffers. What you are interested in are drawing buffers, I think.
3rd question: What is the pattern with the "Circle(" command ?The pattern is the bit pattern. If the value you input has an ON bit, the pixel won't be drawn in the circle. For example, if you want every other pixel drawn in the circle:
Circle(Y,X,R,1,E10101010 ;The E is [2nd][,]
If you want 2 pixels off, two pixels on, use E10011001 (which is 153). Remember, the 1s mean to skip the pixel, 0s mean to draw it. 4th question: What is the difference between ClrDraw and ClrHome ?ClrDraw clears the graph screen
ClrDraw clears the graph screen
ClrHome clears the home screen
:Asmprgmassembly-hex-code
or
:AsmPrgm
:assembly-hex-code
:solve(1, buffer-adress , Pic1-adress , 768
10) Why does the not( command compare all the 16 bits, and the xor don't ?xor does use all 16-bits, as well.
11) Does the "StorePic" command work, or I should store my Pics with solve( ?StorePic does not work, so you will need to use your above code.Code: [Select]:solve(1, buffer-adress , Pic1-adress , 768
12) Can you give me an example of what to do with inString ? I'm not sure I understand its role.
.0:Return
":CAT:4CHAT:HELLO:7BONJOUR:I:2JE→A
inString(A,":HELLO:
+Ɵ'→S ;Ɵ' is the length of ":HELLO:", S points to the 07BONJOUR part, now
IS>(S→B
ClrDraw
Text(0,0,S,B
DispGraph
Stop
13) idem, for length('... :/This is like det(5 in Celtic3.
Get("EPROG→Z
length(Z,0,3
That will return a pointer to line 3 in EPROG and the number of bytes in the line in Ɵ'.14) explain Fix 32 ... What is the "text mode" ?I don't know, actually. I think I may have forgotten to remove that o.O
15) explain conj(' . I understand conj( , but not the 2 syntaxes of conj('.I don't know how to explain it except that it is like Axe :/
I don't know how to explain it except that it is like Axe
This is like det(5 in Celtic3.Code: [Select]Get("EPROG→Z
That will return a pointer to line 3 in EPROG and the number of bytes in the line in Ɵ'.
length(Z,0,3
Je voudrai qu'il y ait un tutoriel pour Grammer en français ; je commence donc le projet mais ne parle pas très bien le français.Grammer(tutoriel français)Bonjour, je m'appelle Zeda et j'ai inventé le langage de programmation "Grammer." Premièrement, je ne parle pas français, donc la documentation peut-être mauvaise (et aussi la grammaire). Le Grammer est un langage pour les TI-83+/84+/SE.
Il y a une version sous forme de programme assembleur ici (http://www.ticalc.org/archives/files/fileinfo/441/44104.html), mais l'application a plus de fonctions, de vitesse, et d'options.
Qu'est-ce que Grammer? Grammer est un langage interprété.
Comment faire un programme? Utiliser l'éditeur de TI-BASIC en mettant à la première ligne :Code: [Select].0:
Ajouter également le token Return (pour que ça quitte si vous l'exécutez en tant que Basic) :Code: [Select].0:Return
Comment arrêter un programme Grammer ? Il suffit d'utiliser le token Stop.Concevoir un programmeJe voudrais commencer le tuto par un exemple. Vous pouvez "parler" au programme à travers des fonctions et des tokens, mais le programme peut lui aussi vous "parler". Donc, il y a des fonctions pour les calculs, les entrées et les sorties. Par exemple:Code: [Select]:.0:Return
[/color]
:.LOOP ; une étiquette
:getKey→A ; stockage du code de la touche pressée dans A
:If A=0 ; si A vaut zéro
:Goto Lbl "LOOP ; aller à l'étiquette "LOOP"
:ClrDraw ; efface l'écran
:Text(0,0,A ; affiche la valeur de A
:DispGraph ; affiche l'écran
:Stop ; arrête le programme
Bonjour à tous !Lol :P
On serait pas dans une section francophone par hasard ?
Bon, sinon, j'apporte une correction de la langue :
...
Rassure-toi, ton niveau de français n'est pas exécrable !
Il s'agit essentiellement de corrections de genre, de grammaire, et de tournures de phrase.
@+
Get("EPROG→Z
Text(0,0,length('Z,0,3
Je utilise "0" pour 65536. Si vous donnez un autre nombre, il ne cherchera pas aprês ce nombre d'octets.length('Z,0,3→Str2'
Text(0,0,Str2
length('Z,0,3→Str2'
Text(0,0,Str2
Don't work.:Text(0,0,length('Z,1,0,2 gives me the second line, yes, but:This is because the 1 makes it so that it will not check anything beyond 1 byte. 0 menas it won't check anything beyond 65536 bytes (0==65536).
:Text(0,0,length('Z,1,1,2 gives me the first line.
Et quel est le 4ème argument (linebyte) ? length('StartSearch,Size,LineNumber,[LineByteThis is in case you are reading data that does not use newline tokens. For example, space=29h=41. You can do this:
.0:
"BONJOUR TOUT LE MONDE!→A
For(B,1,4
length('A,22,B,41→C
Ɵ'→D ;length of the string
Text(6*A-1,0,C,D
DispGraph
End
Stop
And can we execute the line, if it's code ? If you use a Goto, it won't execute just the line, but all the program after it.Yes, use expr( :)
Yeah, I have to fix storing to OS strings. I have the fixed version here if you want to try it out :)Code: [Select]length('Z,0,3→Str2'
Don't work.
Text(0,0,Str2
I didn't know that we can store strings in Str1,Str2 etc without using solve( ...
Yeah, I have to fix storing to OS strings. I have the fixed version here if you want to try it out
Wow, your tutorial is far ahead of mine.