Search found 61 matches

by bulrush
Jan 02, 2016 16:44
Forum: Beginners
Topic: gdb: How to print item in array?
Replies: 1
Views: 1924

gdb: How to print item in array?

Freebasic 1.04.0 32bit on Windows 7/8 64bit. When I'm in the gdb debugger, how do I print an item in an array? dim filearr(2) as string filearr(0)="zero" filearr(1)="one" At the debugger prompt, I type 'p FILEARR(0)' and I get an error 'Invalid data type for function to be called...
by bulrush
Jan 02, 2016 0:21
Forum: Beginners
Topic: Why do I get "duplicate definition" error?
Replies: 3
Views: 693

Re: Why do I get "duplicate definition" error?

Doh! Thank you. What I could use is a list of reserved words so I can grep though them easily.
by bulrush
Jan 02, 2016 0:15
Forum: Beginners
Topic: Why do I get "duplicate definition" error?
Replies: 3
Views: 693

Why do I get "duplicate definition" error?

Please be patient, I'm still learning Freebasic. Freebasic 1.04.0 32 bit on Win 7/8 64-bit. I get an error 4 "Duplicate definition lpos" in the code below. The below code is a separte BAS file which is not my main program. Beginning with the first line: ' Markdown to XHTML file for Freebas...
by bulrush
Jan 01, 2016 21:42
Forum: Libraries
Topic: How to fix PCRE error -2?
Replies: 5
Views: 961

Re: How to fix PCRE error -2?

Freebasic 1.04.0 32 bit, "target: win32 486 32bit" but my Windows 8 is a 64-bit OS on a 64-bit machine. Is that a problem? I thought Win8 would be backward compatible with 32bit apps.
by bulrush
Jan 01, 2016 21:35
Forum: Beginners
Topic: Does EXE grow as I #include libraries?
Replies: 2
Views: 477

Does EXE grow as I #include libraries?

As I use #include "something.bi" does my EXE grow because library codes is being added to the EXE?
Do I have to distribute any DLL files with my EXE file?

Just wondering.

Thank you.
by bulrush
Jan 01, 2016 20:29
Forum: Tips and Tricks
Topic: Read text file into array
Replies: 1
Views: 698

Read text file into array

Given a filename that is a text file, this checks to see if the file exists, and if it does, it reads the file into an array. sub readfile(Byref fn as string, filearr() as string) ' This also ignores comment lines beginning with '#'. ' Usage: ' Dim as string filename ' Dim filearr() as string ' read...
by bulrush
Jan 01, 2016 20:24
Forum: Libraries
Topic: How to fix PCRE error -2?
Replies: 5
Views: 961

Re: How to fix PCRE error -2?

I changed my inc\pcre.bi back to what it was, and I'm still getting an error -2. This is my inc\pcre.bi:

Code: Select all

#pragma once
#inclib "pcre"
#include once "pcre-common.bi"


Any ideas?
by bulrush
Jan 01, 2016 19:04
Forum: Libraries
Topic: How to fix PCRE error -2?
Replies: 5
Views: 961

How to fix PCRE error -2?

Freebasic 1.04.0 on Windows 7/8. When I search for a regex in a string I get an error inside my routine getregexstr which I copied from this forum somewhere I think. Here's the subroutine. function getregexstr(buffer as string, pattern as string) as string ' Returns blank if not found, matched part ...
by bulrush
Jan 01, 2016 16:50
Forum: General
Topic: Win8: CHM help file won't show help topics
Replies: 3
Views: 541

Win8: CHM help file won't show help topics

I have Windows 8. I opened the CHM help file for Freebasic 1.04, and it opens showing the TOC, but when I click on an entry on the TOC, no text shows up in the left hand help pane. This was true of the CHM file for Freebasic 0.90 also. Any ideas how to fix this? I'd be fine if I could download a tre...
by bulrush
Jan 01, 2016 16:45
Forum: Libraries
Topic: How to read text file into array?
Replies: 5
Views: 1122

Re: How to read text file into array?

Got it. fxm, would you mind if I posted your routine in the forum for Tips and Tricks?
by bulrush
Jan 01, 2016 16:35
Forum: Libraries
Topic: Regex: how to replace all of given string with back referenc
Replies: 0
Views: 854

Regex: how to replace all of given string with back referenc

Freebasic 1.04.0 on Win 7/8. I'm a Freebasic beginner, long time Perl programmer. I've Googled the forum and the internet and didn't find what I was looking for. Basically I need a Freebasic regex lib that supports back references. I'm a Perl programmer and in Freebasic I want to be able to convert ...
by bulrush
Jan 01, 2016 16:22
Forum: Libraries
Topic: Trying to use regex lib but get error
Replies: 2
Views: 613

Re: Trying to use regex lib but get error

Thank you! I got it working but I did have to update freebasic\inc\pcre.bi to look like this: #pragma once '#inclib "pcre" #inclib "pcre3" #include once "pcre-common.bi" and I did have to put pcre3.dll in the same dir as my EXE and BAS file. Not sure why since my path i...
by bulrush
Dec 31, 2015 21:48
Forum: Libraries
Topic: How to read text file into array?
Replies: 5
Views: 1122

Re: How to read text file into array?

I just changed the parameters to outarr() and it worked, which is similar to what you did. Thank you!
by bulrush
Dec 31, 2015 20:02
Forum: Libraries
Topic: How to read text file into array?
Replies: 5
Views: 1122

How to read text file into array?

Windows 7 cmd box, Freebasic 1.04.0. New to Freebasic, I'm used to Perl. I'm trying to create a general purpose subroutine where, given the filename, it reads the whole text file into an array. Currently I have: sub readfile(Byref fn as string, filearr() as string) ' Read .BLD file and set global va...
by bulrush
Dec 31, 2015 18:50
Forum: Libraries
Topic: Trying to use regex lib but get error
Replies: 2
Views: 613

Trying to use regex lib but get error

I'm on Win7, cmd window using Freebasic 1.04.0 for win32 and I'm new to Freebasic. I'm normally a Perl programmer so I'm real partial to regex. I'm getting an error when I compile "c:\me\compiler\freebasic104\bin\win32\ld.exe: cannot find -lpcre". From searching around it sounds like I nee...

Go to advanced search