Read a text and attribute it to a variable - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Read a text and attribute it to a variable (/showthread.php?tid=2201) Pages:
1
2
|
RE: Read a text and attribute it to a variable - SMcNeill - 11-24-2023 The most basic way to do this, is to write a very simple parser to do a find a replace job on the code, such as something like this: Code: (Select All)
Of course, this is about as simple as possible, and only works in this one instance, but it showcases what you'd be looking for here. Note that this won't handle something such as: CHR$(34) + "Hello World" -- I'm only doing a search and replace on things with the " + CHR$(34) + " format. RE: Read a text and attribute it to a variable - krovit - 11-25-2023 Very good! Thank you all for your kind cooperation and help! After the disappointment for RhoSigma's words, I was just weighing on a system like the one proposed by SMcNeill, which then - as I saw - preceded me in the realization. And it works! Obviously, it needs to be adapted a bit to my code and to the cases that may arise, but that is the solution to the problem. |