flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > dd DATE 181117, EVENT "question"

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 17 Nov 2018, 13:16
hi, as i am trying to do some administration application, i need to trace curves (without libreoffice calc), using datas in the code.

assuming i use some macro to generate a string of lines (then, get a curve) i will code for example:
Code:
tomatoes:
LINES  20181101,50,20181110,58,20181117,10
    

with dates closes to each others, the curve is ok with this kind of declaration, but when comes the time to go to next month, or worse, next year, i will get very long gaps in the plot.

then, the question is just to know if some sort of data prefixing is possible using macros in order to transform it in another scale during compilation.

then, i will get a result like
Code:
tomatoes:
LINES DATEOFFSET 20181100, DATE 20181101,50

;compiles as

LINES 01,50
    


thanks.
indeed, i continue to work on the data model, then, maybe no more need to do it later cause i'll use some data manipulation methods.

[edit]

it appears i can maybe use specific values for DATE, DATEOFFSET in the LINES stream, in order to do the data manipulation on the fly... usefull when i will play with external files.
Post 17 Nov 2018, 13:16
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 18 Nov 2018, 03:45
You need to make a macro named "LINES" and process the data inside it. For example:
Code:
macro LINES [date,value] {
 forward
 found equ 0
 match =DATEOFFSET number,date \{
  ;do something
  found equ 1
 \}
 match =0 number,found date \{
  ;do something else
 \}
}    
Post 18 Nov 2018, 03:45
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 22 Nov 2018, 12:50
yeah, j'y avait pas pensé, merci mec/meuf!
oui, i didn't tought about it, thanks man/girl
Post 22 Nov 2018, 12:50
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.