Can I check and / or compile a code in memory? ...
-
- Enthusiast
- Posts: 303
- Joined: Tue Feb 14, 2017 12:07 pm
Can I check and / or compile a code in memory? ...
Hello,
I would like to know if we can check and compile a code in memory?
When I query the compiler and I code it, it compiles it and returns the answer.
When it does this, it create files ...
In addition I am obliged to give him a code in the form of PB file
Or can I give him code in the form of text?
What I would like to do is give code in the form of text to the compiler
And it checks if all is ok and returns me the answer without writing
File to disk, all in wholesale memory.
Is it possible or not?
--------
Salut,
Je voudrait savoir si l'on peut-on vérifier et ou compiler un code en mémoire ?
Quand j’interroge le compilateur et que je lui file du code, il le compile et renvoie la réponse.
Quand il fais ça, il créer des fichiers...
De plus suis-je obliger de lui donner un code sous forme de fichier PB
ou est ce que je peut lui donner du code sous forme de texte ?
Ce que j'aimerais, c'est donner du code sous forme de texte au compilateur
et qu'il vérifie si tous est ok et me renvoi la réponse sans écrire
de fichier sur le disque, tous en mémoire en gros.
Est ce que c'est possible ou non ?
I would like to know if we can check and compile a code in memory?
When I query the compiler and I code it, it compiles it and returns the answer.
When it does this, it create files ...
In addition I am obliged to give him a code in the form of PB file
Or can I give him code in the form of text?
What I would like to do is give code in the form of text to the compiler
And it checks if all is ok and returns me the answer without writing
File to disk, all in wholesale memory.
Is it possible or not?
--------
Salut,
Je voudrait savoir si l'on peut-on vérifier et ou compiler un code en mémoire ?
Quand j’interroge le compilateur et que je lui file du code, il le compile et renvoie la réponse.
Quand il fais ça, il créer des fichiers...
De plus suis-je obliger de lui donner un code sous forme de fichier PB
ou est ce que je peut lui donner du code sous forme de texte ?
Ce que j'aimerais, c'est donner du code sous forme de texte au compilateur
et qu'il vérifie si tous est ok et me renvoi la réponse sans écrire
de fichier sur le disque, tous en mémoire en gros.
Est ce que c'est possible ou non ?
I am French, I do not speak English.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Re: Can I check and / or compile a code in memory? ...
Are you, looking for Syntax Check in the menu under Compile , perhaps?
DE AA EB
-
- Enthusiast
- Posts: 303
- Joined: Tue Feb 14, 2017 12:07 pm
Re: Can I check and / or compile a code in memory? ...
No no it's not that at all.
Nothing to do with this.
http://www.purebasic.fr/english/viewtop ... 13&t=67832
Nothing to do with this.
http://www.purebasic.fr/english/viewtop ... 13&t=67832
I am French, I do not speak English.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Re: Can I check and / or compile a code in memory? ...
you want an interpreter but pb is a compiler.
Re: Can I check and / or compile a code in memory? ...
I'm guessing that you want to be able to send the compiler (in /STANDBY mode) the text of your program in a block of memory.
(and perhaps get results back in memory). Is that correct?
Unfortunately, I admit I don't know of any way to do that.
(and perhaps get results back in memory). Is that correct?
Unfortunately, I admit I don't know of any way to do that.
-
- Enthusiast
- Posts: 303
- Joined: Tue Feb 14, 2017 12:07 pm
Re: Can I check and / or compile a code in memory? ...
Yes I think that's it 
I send text (code) to the compiler, this one
Checks if it is ok and returns the result, ex:
"49 * (25 * (69/14))" -> OK -> 4900
But without creating a file!
All in Memory.

I send text (code) to the compiler, this one
Checks if it is ok and returns the result, ex:
"49 * (25 * (69/14))" -> OK -> 4900
But without creating a file!
All in Memory.
I am French, I do not speak English.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Re: Can I check and / or compile a code in memory? ...
Hi,
search for eval
Bernd
search for eval
Bernd
-
- Enthusiast
- Posts: 303
- Joined: Tue Feb 14, 2017 12:07 pm
Re: Can I check and / or compile a code in memory? ...
Hello
Yes thank you, I know but it's not what I want!
http://www.purebasic.fr/english/viewtop ... 13&t=67832
Yes thank you, I know but it's not what I want!
http://www.purebasic.fr/english/viewtop ... 13&t=67832
I am French, I do not speak English.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Can I check and / or compile a code in memory? ...
Well, you can use RAM drive. That's probably one way to avoid disk writes [but not file creation]
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Re: Can I check and / or compile a code in memory? ...
http://www.purebasic.fr/english/viewtop ... lit=imdisk
Interface to ImDisk by JHPJHP; admin rights needed.
Interface to ImDisk by JHPJHP; admin rights needed.
Re: Can I check and / or compile a code in memory? ...
So basically he wants to compile/run without using any temporary files on disk. A RAM disk would do it, but that's a lot of system overhead.
I wonder what would happen if he ran PureBasic in portable mode from a locked SD card (or other non-writable media, like a DVD), and with the IDE set to create temporary files in the same folder as the source?
Anyone tried that yet?
I wonder what would happen if he ran PureBasic in portable mode from a locked SD card (or other non-writable media, like a DVD), and with the IDE set to create temporary files in the same folder as the source?

-
- Enthusiast
- Posts: 303
- Joined: Tue Feb 14, 2017 12:07 pm
Re: Can I check and / or compile a code in memory? ...
Thank you for your answers 

I am French, I do not speak English.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.