Search found 144 matches

by C64
Mon Feb 21, 2011 9:38 pm
Forum: Coding Questions
Topic: Multiple file extensions in ExamineDirectory() ?
Replies: 34
Views: 7072

Re: Multiple file extensions in ExamineDirectory() ?

Rook's solution is far too slow for large directories, slow devices (DVD drives) and low-bandwidth network shares; because it basically does a whole directory scan for each extension required. You should only do one single directory scan, and check the extension for each file found during the scan ...
by C64
Sat Feb 19, 2011 6:07 pm
Forum: Feature Requests and Wishlists
Topic: IDE refactoring tools
Replies: 16
Views: 8186

Re: IDE refactoring tools

I edited my post because it was a bit rude. Sorry!
by C64
Sat Feb 19, 2011 6:04 pm
Forum: Coding Questions
Topic: Check if InitSprite() has been already called
Replies: 7
Views: 1166

Re: Check if InitSprite() has been already called

nco2k wrote:when writing a userlib, is there a trick how to check if InitSprite() / InitSprite3D() has been already called?
Why not save yourself the hassle and just say in your manual that those commands must be called before using the commands in your lib? Why reinvent the wheel?
by C64
Sat Feb 19, 2011 5:58 pm
Forum: Feature Requests and Wishlists
Topic: IDE refactoring tools
Replies: 16
Views: 8186

Re: IDE refactoring tools

You said "let's replace Blubb with something else", so I did. Now I see you MEANT to say "let's replace Blubb() with something else". I just work with what's given...
by C64
Sat Feb 19, 2011 5:55 pm
Forum: Coding Questions
Topic: FileSize() with a wild card?
Replies: 29
Views: 7020

Re: FileSize() with a wild card?

Vera, you do know a directory is a folder, right? So do I really need to point it out in the manual?
by C64
Sat Feb 19, 2011 2:23 pm
Forum: Feature Requests and Wishlists
Topic: IDE refactoring tools
Replies: 16
Views: 8186

Re: IDE refactoring tools

Let's try to get an example where you can't use Search & Replace:
Procedure Blubb()
; ...
EndProcedure

Procedure BlubbEx()
; ...
EndProcedure

Procedure ExBlubb()
; ...
EndProcedure

Global Blubb.i

; ABC Blubb ExBlubbEx Blubb()

Debug "Blubb"
Debug "BlubbEx"
Debug "ExBlubb"

Debug "Blubb ...
by C64
Sat Feb 19, 2011 11:50 am
Forum: Feature Requests and Wishlists
Topic: IDE refactoring tools
Replies: 16
Views: 8186

Re: IDE refactoring tools

DarkDragon wrote:Search/Replace for Blubb would also replace Blubb in BlubbEx
Searching for "whole words only" solves that problem. Or, even simpler, just add the opening bracket to the procedure name when searching.
by C64
Sat Feb 19, 2011 3:28 am
Forum: Feature Requests and Wishlists
Topic: IDE refactoring tools
Replies: 16
Views: 8186

Re: IDE refactoring tools

Appending, prepending and renaming is just a search/replace in the source, no? In any event, I've already been working on a source code cleaner that does a little of what you want. No timeframe yet. It came about for the same reason as yourself: my source (which is now 570 KB) is looking messy and I ...
by C64
Fri Feb 18, 2011 1:44 pm
Forum: Coding Questions
Topic: FileSize() with a wild card?
Replies: 29
Views: 7020

Re: FileSize() with a wild card?

All WinZip does is throw up an error and then show me an empty archive ("Total 0 files, 0 bytes"). Anyway, I get where you're coming from. :)
by C64
Fri Feb 18, 2011 12:58 pm
Forum: Coding Questions
Topic: FileSize() with a wild card?
Replies: 29
Views: 7020

Re: FileSize() with a wild card?

What could be a viable solution for the affected?
In all seriousness and with no malice or sarcasm intended: nothing. The GIGO acronym is all that matters here, because the manual is clear enough: a file must be specified. A file with a wildcard is not a file. If it is, please zip me a file with ...
by C64
Fri Feb 18, 2011 7:36 am
Forum: Coding Questions
Topic: FileSize() with a wild card?
Replies: 29
Views: 7020

Re: FileSize() with a wild card?

jassing wrote:FileSize() can't be used for folders either
The manual clearly states that FileSize() can be used with files and folders. It is YOU who is not using the command correctly, as has been pointed out with the GIGO principle. Please stop spreading false statements.
by C64
Thu Feb 17, 2011 10:02 am
Forum: Coding Questions
Topic: FileSize() with a wild card?
Replies: 29
Views: 7020

Re: FileSize() with a wild card?

Hi, jAssing. If I may:

when I issue debug "checkfilename("C:\temp\snap6.jpg") it returns 0
The manual for CheckFilename() says: The 'Filename$' must not include its path.

The docs says to use it to check for the existence of a file... a file
Filenames do not have wildcards in them. Use a ...
by C64
Thu Feb 17, 2011 8:57 am
Forum: Coding Questions
Topic: more ftp "huh"
Replies: 10
Views: 2277

Re: more ftp "huh"

jassing wrote:how can that have been screwed up?
When an illegal memory access error occurs, it's not always necessarily directly related to the highlighted line (it can be an on-flow error). So make sure everything else in your code prior to that line is 100% perfect, just to be sure.
by C64
Tue Feb 15, 2011 12:05 pm
Forum: Windows
Topic: LoadFont () how to check if font exists?
Replies: 16
Views: 6942

Re: LoadFont () how to check if font exists?

dige wrote:How to check if a font really exists?
http://www.purebasic.fr/english/viewtopic.php?p=233557
by C64
Tue Feb 15, 2011 10:48 am
Forum: Feature Requests and Wishlists
Topic: Debug with more than one parameter
Replies: 4
Views: 1191

Re: Debug with more than one parameter

Here's a way to print three variables at a time, but not on the same line. It's handy so you don't have to type Str() all the time.

Code: Select all

Macro Debug3(v1,v2,v3)
  Debug v1
  Debug v2
  Debug v3
EndMacro

three$="3"

Debug3(1,"two",three$)