Search found 254 matches

by codeFoil
Aug 08, 2012 0:08
Forum: Beginners
Topic: up.bas(108) warning 14(0): Function result was not explicitl
Replies: 42
Views: 2040

Re: up.bas(108) warning 14(0): Function result was not expli

The expression %errorLevel% is handled specially by CMD.EXE. It will be evaluated to the value set by the last program executed ONLY if there is NOT an environment variable with that name in the environment variable list. If you start with a fresh environment, and use the "Set" command in ...
by codeFoil
Jul 25, 2012 0:35
Forum: General
Topic: initializing a random file
Replies: 10
Views: 913

Re: initializing a random file

All of FreeBASIC's block statements (For : Next, If Then : End if, While : Wend, etc) begin a new scope, and any variables defined within a block are initialized where they are defined every time that block executes. Edit: Sorry. "All variables" is not quite true. Variable defined as Stati...
by codeFoil
Jul 24, 2012 23:55
Forum: Beginners
Topic: How to read the entire text file in just one string in FB?
Replies: 4
Views: 697

Re: How to read the entire text file in just one string in F

Var fileNum = FreeFile Open "TEST.TXT" for input as fileNum Var fileContent = Input(Lof(fileNum), fileNum) Close fileNum Print fileContent Function FileContent(byref fileName as String) as String function = "" Var fileNum = FreeFile If Open(fileName, for input, as fileNum) = 0 T...
by codeFoil
Jul 22, 2012 19:44
Forum: Tips and Tricks
Topic: Readable font in widescreen
Replies: 3
Views: 735

Re: Readable font in widescreen

@dodicat
Was the ability to invert the inspected region intentional or just a harmless side effect?
by codeFoil
Jul 21, 2012 22:29
Forum: Game Dev
Topic: the pit
Replies: 3
Views: 1177

Re: the pit

This is a great strategy game. Keep it up!
by codeFoil
Jun 29, 2012 20:41
Forum: Windows
Topic: Need help converting from VB to Freebasic
Replies: 5
Views: 937

Re: Need help converting from VB to Freebasic

That's a nice surprise. There are a lot of great forum members here who know more than I do and should be able to provide advice concerning the unicode string conversion and a more secure way to start WinAmp.
by codeFoil
Jun 29, 2012 19:10
Forum: Windows
Topic: Need help converting from VB to Freebasic
Replies: 5
Views: 937

Re: Need help converting from VB to Freebasic

This is a starting point. 1. Used the WinAPI header file. Some of the constants, type definitions, and routine declarations are a part of the API. 2. Removed all Private and Public keywords. They are valid and meaningful in routine definitions, but not for UDT type definitions. 3. Changed several in...
by codeFoil
Jun 28, 2012 0:14
Forum: Community Discussion
Topic: Looking for Embroidery File Specification
Replies: 8
Views: 1884

Re: Looking for Embroidery File Specification

If you ultimately can not find information on this file format, and you are feeling adventurous, you could try a little experimentation. It is claimed that the first programmer to successfully force his older TI calculator to run assembly programs started by making random changes to the data file us...
by codeFoil
Jun 26, 2012 23:59
Forum: DOS
Topic: LOCATE bug?
Replies: 17
Views: 3091

Re: LOCATE bug?

'Pcopy' copies also the text cursor position and the graphic cursor position. I think atrocity is referring to the visible blinking cursor displayed by the graphics card on a DOS system. After a quick look at the code for Locate and Screen for the DOS runtime, I can see that both make BIOS calls. I...
by codeFoil
Jun 20, 2012 16:28
Forum: General
Topic: I there is anyway to char in FB
Replies: 14
Views: 806

Re: I there is anyway to char in FB

HACK3R ADI wrote:why Rich and you change x to &h


&h is the convention in BASIC for specifying hexadecimal notation.
by codeFoil
Jun 18, 2012 22:56
Forum: General
Topic: Undefined reference to `.Lt_0015' with #Macro.
Replies: 3
Views: 167

Re: Undefined reference to `.Lt_0015' with #Macro.

I'm not entirely sure why, but it appears that the #Undef directives are causing a problem with the compilers symbol table. This Dim pri as UInteger Ptr = ImageCreate(5,5,0, 32) Dim as Uinteger Ptr pri_pixdata Dim as Integer pri_pitch ImageInfo( pri,,,,pri_pitch, pri_pixdata,) pri_pitch Shr= 2 #Unde...
by codeFoil
Jun 14, 2012 23:03
Forum: Community Discussion
Topic: CPU cache speeds vs Ram speeds
Replies: 17
Views: 1366

Re: CPU cache speeds vs Ram speeds

BasicCoder2 wrote:That is reading not writing. You can remember all about someone including their facial characteristics without their label (name).


But can you recall details for which you do not have words? Seeing and remembering are not entirely distinct activities.
by codeFoil
Jun 14, 2012 22:55
Forum: Community Discussion
Topic: The Freebasic Magic castle , interactive dungeon
Replies: 24
Views: 3217

Re: The Freebasic Magic castle , interactive dungeon

The problem will be formatting, parsing, providing, retrieving and converting the data. Data serialization isn't always straight-forward. FreeBASIC doesn't have builtin support for SOAP or JSON, or event-handling/asynchronous callbacks tied into this afaik. So yeah, just "simple strings",...
by codeFoil
Jun 13, 2012 21:06
Forum: Beginners
Topic: Nested subroutine workaround?
Replies: 12
Views: 646

Re: Nested subroutine workaround?

but I don't know how to define a macro to produce two lines of code, or if it's even possible. Roger Look up the #macro directive. But in this case, I don't think that is what you need here. It sounds like you have a problem with "forward referencing". Make sure that your Ltext subroutine...
by codeFoil
Jun 08, 2012 1:29
Forum: Beginners
Topic: special key recognition
Replies: 5
Views: 412

Re: special key recognition

This rather bloated program hangs around on my system because I can never remember certain details. 'FBechokeys.bas - Console Mode program to echo out key values returned ' by Inkey() function. 'Ryan Kelly 2012 ' 'Compile with fbc FBechokeys.bas '_____________________________________________________...

Go to advanced search