LibCurl - Identifier 'Replace' not found
BlitzMax Forums/BlitzMax Programming/LibCurl - Identifier 'Replace' not found
| ||
after including the libcurl framework a Compile Error: Identifier 'Replace' not found occurs. Strict Import MaxGUI.Drivers Framework BaH.libcurl Import BRL.StandardIO Global target_path$="C:\internet\" Local name$ = CurrentDate()+"_"+CurrentTime() name$ = Replace(name$,":","-") <--------- Compile Error name$ = Replace(name$," ","") I´ve recompiled everything and reinstall BMAx 1.48, but all the same. I found nothing about that in the forum. Has anyone an idea? |
| ||
Hello, when you use Framework-keyword, BlitMax imports only those modules that you specify. Place cursor on top of Replace-keyword in your source code and press F1-key twice. Now scroll at the top of help screen to see what you need to import in order to enable Replace-function (which is BRL.Retro) so add "Import BRL.Retro" among your imports and problem goes away. By default BlitzMax imports all of it's basic modules, thus also increasing the executable size. -Henri |
| ||
Hi Henri, thanks a lot. I´ve read the documentation now and it´s written there. I forgot these detail. I use now import, and everything is fine also. The using of Framework is from the example i´ve tried first. I guess to use import it is the better way, if not only one modul is nessecary. Am I right? Greetings from Berlin Winfried |
| ||
Usually I use framework at the last state of program, when I'm ready to release so that size is reduced to minimum. Framework Assistant is handy tool to determine what is needed, but you can also do it the way I described earlier. -Henri |
| ||
Rather than using that nasty BRL.Retro module, you can instead use the String Replace() method, which is much more in line with the OO style of BlitzMax :name = name.Replace(":","-") |