Advise Needed! 
Author Message
 Advise Needed!

Is there a QB Style basic out there which supports long filenames and can
compiled .exe's which can run without the need for libraries'

This is the sort of thing that I'm used to writing for QB......

              OPEN BackupFile$ FOR INPUT AS #3
                OPEN TextFile$ FOR OUTPUT AS #4
                  DO
                    LINE INPUT #3, DataLine$
                    IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
                      PRINT #6, "      - found data, deleting!"
                      FOR Skip% = 1 TO NumLine%
                        LINE INPUT #3, DataLine$
                      NEXT Skip%
                      Flag% = 1
                    END IF
                    PRINT #4, DataLine$
                  LOOP UNTIL EOF(3)
                  IF Flag% = 0 THEN PRINT #6, "      - data not found!"
                CLOSE #4
              CLOSE #3

I don't have an American recognised credit card so I don't have the option
of buying powerbasic CC/DLL (as if I could afford on my meagre wage)

Vonotar



Mon, 05 Jul 2004 18:57:03 GMT  
 Advise Needed!

Quote:

> Is there a QB Style basic out there which supports long filenames and can
> compiled .exe's which can run without the need for libraries'

> This is the sort of thing that I'm used to writing for QB......

>               OPEN BackupFile$ FOR INPUT AS #3
>                 OPEN TextFile$ FOR OUTPUT AS #4
>                   DO
>                     LINE INPUT #3, DataLine$
>                     IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
>                       PRINT #6, "      - found data, deleting!"
>                       FOR Skip% = 1 TO NumLine%
>                         LINE INPUT #3, DataLine$
>                       NEXT Skip%
>                       Flag% = 1
>                     END IF
>                     PRINT #4, DataLine$
>                   LOOP UNTIL EOF(3)
>                   IF Flag% = 0 THEN PRINT #6, "      - data not found!"
>                 CLOSE #4
>               CLOSE #3

> I don't have an American recognised credit card so I don't have the option
> of buying Powerbasic CC/DLL (as if I could afford on my meagre wage)

> Vonotar

Though development ceased this summer while it was still in Beta it seems
RabidQ (A programming language for Windows based on QBasic) may do what you
need done.  I've used it as part of a self updating routine for a VB
project, the VB program extracted the files and if the "new .exe" was on of
the files it launched the RapidQ program, terminated itself.  The RapidQ
program backed up the original file, copied the new program and relaunched
the VB app then terminated itself.  It added a single 300K .exe file to the
program.  I don't know the URL for it off the top of my head, but a search
on google should turn it up.

I hope this helps.

Best,
Bill
--

--------------------------------------------------------
Due to excessive spam and being tired of redoing my mail
filters every week I now post to newsgroups with a bogus
username in my e-mail address.  To reach me make it



Mon, 05 Jul 2004 22:05:13 GMT  
 Advise Needed!

Hello Vonotarm

Quote:
> Is there a QB Style basic out there which supports long filenames and can
> compiled .exe's which can run without the need for libraries'

Well, if you don't need fancy windows and are allready using QB, you could
allway's do a SHELL("DIR
"+chr$(34)+LFN$+"chr$(34)+">"+environ$("TEMP")+"\TEMPFILE.TXT") and read the
short (8.3) name from the temp-file stored into (you guessed it :-) the
Temp-directory.  With it you can access the data you want.

As for the output, write to a file with a temporary name, and use SHELL
(again) to rename it to anything you want.

The above will not get the Beauty-of-the-month award, but it gets the job
done ...

Another way is to use some machine-code programs stored into array's in the
basic-program (see CALL ABSOLUTE and the like).  But that's for
Assembly-lovers only :-)

Regards,
  Rudy Wieser



Tue, 06 Jul 2004 01:31:16 GMT  
 Advise Needed!
Not quite the thing I need....
One of the first thing's I tried was creating a short-filename file and then
shelling to rename it into a long one...
Doesn't work..

ThisIsALongFilename.txt simply becomes THISISAL.TXT

Vonotar


Quote:

> Hello Vonotarm

> > Is there a QB Style basic out there which supports long filenames and
can
> > compiled .exe's which can run without the need for libraries'

> Well, if you don't need fancy windows and are allready using QB, you could
> allway's do a SHELL("DIR
> "+chr$(34)+LFN$+"chr$(34)+">"+environ$("TEMP")+"\TEMPFILE.TXT") and read
the
> short (8.3) name from the temp-file stored into (you guessed it :-) the
> Temp-directory.  With it you can access the data you want.

> As for the output, write to a file with a temporary name, and use SHELL
> (again) to rename it to anything you want.

> The above will not get the Beauty-of-the-month award, but it gets the job
> done ...

> Another way is to use some machine-code programs stored into array's in
the
> basic-program (see CALL ABSOLUTE and the like).  But that's for
> Assembly-lovers only :-)

> Regards,
>   Rudy Wieser



Tue, 06 Jul 2004 04:35:23 GMT  
 Advise Needed!
Rapid-Q simply falls flat on it's face on my WinXP, I think it's something
to do with it's graphical interface.

I just need a plain old text Basic that either can use longfilenames or
correctly shell's to the 32bit dos so I can use the dos REN command as a
crutch.

Vonotar

--
"Aloisia Vonotar"

--
"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music." - Kristian Wilson, Nintendo Inc,
1989

Quote:

> > Is there a QB Style basic out there which supports long filenames and
can
> > compiled .exe's which can run without the need for libraries'

> > This is the sort of thing that I'm used to writing for QB......

> >               OPEN BackupFile$ FOR INPUT AS #3
> >                 OPEN TextFile$ FOR OUTPUT AS #4
> >                   DO
> >                     LINE INPUT #3, DataLine$
> >                     IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
> >                       PRINT #6, "      - found data, deleting!"
> >                       FOR Skip% = 1 TO NumLine%
> >                         LINE INPUT #3, DataLine$
> >                       NEXT Skip%
> >                       Flag% = 1
> >                     END IF
> >                     PRINT #4, DataLine$
> >                   LOOP UNTIL EOF(3)
> >                   IF Flag% = 0 THEN PRINT #6, "      - data not found!"
> >                 CLOSE #4
> >               CLOSE #3

> > I don't have an American recognised credit card so I don't have the
option
> > of buying Powerbasic CC/DLL (as if I could afford on my meagre wage)

> > Vonotar

> Though development ceased this summer while it was still in Beta it seems
> RabidQ (A programming language for Windows based on QBasic) may do what
you
> need done.  I've used it as part of a self updating routine for a VB
> project, the VB program extracted the files and if the "new .exe" was on
of
> the files it launched the RapidQ program, terminated itself.  The RapidQ
> program backed up the original file, copied the new program and relaunched
> the VB app then terminated itself.  It added a single 300K .exe file to
the
> program.  I don't know the URL for it off the top of my head, but a search
> on google should turn it up.

> I hope this helps.

> Best,
> Bill
> --

> --------------------------------------------------------
> Due to excessive spam and being tired of redoing my mail
> filters every week I now post to newsgroups with a bogus
> username in my e-mail address.  To reach me make it




Tue, 06 Jul 2004 04:37:31 GMT  
 Advise Needed!
If PB is what you need then mail them an AmExp check in U.S. dollars and buy
it.

Other choices would be the free Borland C++ compiler.

Or consider Delphi 5 Standard as something reasonable in cost with both
console mode and GUI mode. (No commerical restriction on Standard.)



Tue, 06 Jul 2004 14:42:22 GMT  
 Advise Needed!

Hello Vonotar,

Quote:
> Not quite the thing I need....
> One of the first thing's I tried was creating a short-filename file and
then
> shelling to rename it into a long one...
> Doesn't work..

> ThisIsALongFilename.txt simply becomes THISISAL.TXT

Yes, that's what you forget the quotes around the long filename ... :-)

  SFN$="ShortName.TXT"
  LFN$= "ThisIsALongFilename.txt"
  shell("ren "+SFN$+" "+chr$(34)+LFN$+chr$(34) )

Regards,
  Rudy Wieser



Tue, 06 Jul 2004 20:35:49 GMT  
 Advise Needed!

Quote:
> Is there a QB Style basic out there which supports long filenames and can
> compiled .exe's which can run without the need for libraries'

Yes, use VBScript. Note: Install the latest Internet Explorer to get the
most recent Windows Script Host release. WSH (Windows Script Host) ist
exactly intended for such tasks; it's full 32 bit and much more powerful
than DOS batches.

Usenet group about WSH:

microsoft.public.scripting.wsh

=> post your questions here. VBScript reference:

http://msdn.microsoft.com/scripting/

      Andreas



Tue, 06 Jul 2004 20:54:36 GMT  
 Advise Needed!

Quote:

> Is there a QB Style basic out there which supports long filenames and can
> compiled .exe's which can run without the need for libraries'

> This is the sort of thing that I'm used to writing for QB......

>               OPEN BackupFile$ FOR INPUT AS #3
>                 OPEN TextFile$ FOR OUTPUT AS #4
>                   DO
>                     LINE INPUT #3, DataLine$
>                     IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
>                       PRINT #6, "      - found data, deleting!"
>                       FOR Skip% = 1 TO NumLine%
>                         LINE INPUT #3, DataLine$
>                       NEXT Skip%
>                       Flag% = 1
>                     END IF
>                     PRINT #4, DataLine$
>                   LOOP UNTIL EOF(3)
>                   IF Flag% = 0 THEN PRINT #6, "      - data not found!"
>                 CLOSE #4
>               CLOSE #3

> I don't have an American recognised credit card so I don't have the option
> of buying Powerbasic CC/DLL (as if I could afford on my meagre wage)

Here is your programme translated into XBasic :

'         OPEN BackupFile$ FOR INPUT AS #3
 backup = OPEN(BackupFile$   , $$RD)

'           OPEN TextFile$ FOR OUTPUT AS #4
 textfile = OPEN(TextFile$   , $$WR)

'DO
 DO

' LINE INPUT #3, DataLine$
  DataLine$ = Infile$(backup)

' IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN
  IF (DataLine$ = FirstLine$) AND (Flag% = 0) THEN

'   PRINT #6, "      - found data, deleting!"
    PRINT     "      - found data, deleting!"

'   FOR Skip% = 1 TO NumLine%
    FOR Skip% = 1 TO NumLine%

'     LINE INPUT #3, DataLine$
      DataLine$ = Infile$(backup)

'   NEXT Skip%
    NEXT Skip%

'   Flag% = 1
    Flag% = 1

' END IF
  END IF

' PRINT #4         , DataLine$
  PRINT [textfile] , DataLine$

' LOOP UNTIL EOF(3)
  LOOP UNTIL EOF(backup)

'IF Flag% = 0 THEN PRINT #6, "      - data not found!"
 IF Flag% = 0 THEN PRINT     "      - data not found!"

'CLOSE #4
 CLOSE(textfile)

'CLOSE #3
 CLOSE(backup)

Vic



Wed, 07 Jul 2004 06:41:57 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. ssTAB1 Advise needed please (Newbie Question)

2. MS-Outline: Advise needed

3. Visual Studio upgrade - Advise needed

4. Graphing advise needed

5. Advise needed

6. MS-Outline: Advise needed

7. Advise Needed: Multi-Threaded App

8. Advise needed

9. acces/vb/internet advise needed

10. access/vb/internet advise needed

11. Hierarchical Recordsets and DTE advise needed

12. Need advise on Strategy for operation on a network

 

 
Powered by phpBB® Forum Software