Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make Pre- and Post- increment/decrement operators work on all types

Aperta
#170 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
compilers

Direzione di ricerca

Start by reproducing the nested-array example and compare pre-increment with post-increment behavior in the SQF compiler or runtime. Trace how increment and decrement expressions are translated for array element access, then define and test behavior for all supported operand types, including the expected generated SQF.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement sqc

Describe the bug

Lets say i've got this little array here:
example = [ [0,1], [0, 1, 2] ];

Now i want to increase the second value in the first array by one by doing

example[0][1] = ++example[0][1];

However the output sqf code is:

   example = [[0, 1], [0, 1, 2]];
   example = (example + 1);
   example select 0 set [1, example select 0 select 1];

I tries to first increment example and thereafter assign the value to array.
Doing a post increment won't work at all in this context.

I guess this is a really specific usecase and i won't mind not fix it.
In the end it would generate the same code as i would if i had written:

let temp = example[0][1];
temp++;
example[0][1] = temp;
Lingua principale
C++
Stelle
104
Fork
31
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SQFvm/runtime

Tutte le issue di SQFvm/runtime

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.