Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

libertybasic · The Official Liberty BASIC Support Group

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 5577
  • Founded: Jan 12, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 28628 - 28657 of 46476   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Messages: Show Message Summaries Sort by Date ^  
#28628 From: "Gordon Sweet" <gordon@...>
Date: Tue Nov 1, 2005 8:03 am
Subject: Up the creek---again!
gordonsweet2000
Send Email Send Email
 
The software you need is called OPTICAL CHARACTER RECOGNITION ( OCR ) There
should be some Shareware available form ZDNET or CNET

I use Textbridge, and have a large collection of DOC files created from past
copies of our Radio Club's magazines. You will probably need to scan the text
into suitable B/W BMP files, or the OCR will not recognise it.

Gordon S.

[Non-text portions of this message have been removed]

#28629 From: "Gordon Sweet" <gordon@...>
Date: Tue Nov 1, 2005 3:25 pm
Subject: Animated Art
gordonsweet2000
Send Email Send Email
 
Thanks for the 'plug' to my site Stefan. I could not quite follow the ideas
behind this thread. Getting too old!

I think you refer to the variety of old coloured patterns I upgraded from the
distant past on my site, one of which you provided great help in showing me how
to adapt recursive PROCedures to LB..

Gordon S.

[Non-text portions of this message have been removed]

#28630 From: "wismej2" <wismej2@...>
Date: Tue Nov 1, 2005 3:21 pm
Subject: Re: getting towards shareware commercialization: managing keys
wismej2
Send Email Send Email
 
most helpful!
thx a lot,
jm

--- In libertybasic@yahoogroups.com, "Storm Dragon"
<storm_dragon@c...> wrote:
>
> I forgot to mention that you can learn all you need about creating and
> reading .ini files in Alyce's book.  Some reference to the registry
is there
> too.  The address is:
> http://www.alycesrestaurant.com/
> ----- Original Message -----
> From: "Storm Dragon" <storm_dragon@c...>
> To: <libertybasic@yahoogroups.com>
> Sent: Friday, October 28, 2005 6:15 PM
> Subject: Re: [libertybasic] getting towards shareware
commercialization:
> managing keys
>
>
> > Righting registration stuff is, in my opinion, the least fun part of
> > coding.
> > The best way I have found to do it, is put it in an ini file along
with
> > the
> > rest of the program's settings.  This way, you don't have to
bother with
> > the
> > registry and risk messing up a computer.  If you are going to make the
> > registration time based, it makes things a little difficult for you,
> > because
> > someone could always go into the ini file and change the date.  Then
> > again,
> > people can do that with the registry too.  So, the way to do it,
is to
> > make
> > your ini file unreadable by anyone except yourself.  But, be sure
to make
> > notes, so if you need to change something in a few months, you don't
> > forget
> > the reasoning behind what you did.  It would be really kool if
someone
> > came
> > up with something to write registration code automatically into
programs.
> > I
> > may have to see what I can do on that during Christmas break. >:)
> > The other way to do registering, besides with date I mean, is to
disable
> > some of the program's functionality until it is registered.  I
never did
> > like this approach, because even though the customer is getting a
chance
> > to
> > test the program, they aren't getting to test all of the program.
  If they
> > register the program just to find out that they don't like the
additional
> > features, didn't need the additional features, or something else,
then
> > they
> > may never register anything else.
> > As for generating registration codes, the code to do it isn't that
hard,
> > and
> > unlike writing registering code, it is fun.  You need three random
calls
> > for
> > it, and you can check the length of the code with the len command
after
> > appending it to a string var.
> > One random call (50/50 chance) to see if the next character is
going to be
> > a
> > number or letter.
> > if number, the second call can be 0 through 9.
> > if letter, the call would be 65 through 86 I think.
> > Then just add the result to a string var as its ASCII number, like:
> > var$ = chr$(randomnumber)
> > When you have the string to the proper length, which you can check
with
> > the
> > len function, You can generate a random number from 0 to the
length of the
> > string, and then do a lower$() conversion to that part of the
string if
> > you
> > want mixed case.
> >
> > I hope this rambling has been of some help. :)
> >
> > ----- Original Message -----
> > From: "wismej2" <wismej2@y...>
> > To: <libertybasic@yahoogroups.com>
> > Sent: Friday, October 28, 2005 2:15 PM
> > Subject: [libertybasic] getting towards shareware commercialization:
> > managing keys
> >
> >
> >> Hi there,
> >>
> >> I am new to LB, and I will soon be ready to commercialize a SW. I
have
> >> no clue how to manage the license key. I guess I will need to read a
> >> key, check it somehow, write some info in the repository, read that
> >> info at every program start. I guess I'll also need a key generator.
> >>
> >> can anyone help? where shall I look? any code available somewhere?
> >> examples?
> >>
> >> thx a lot,
> >> jm
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>

#28631 From: "pendl2megabit" <pendl2megabit@...>
Date: Tue Nov 1, 2005 4:14 pm
Subject: AW: Animated Art
pendl2megabit
Send Email Send Email
 
Gordon,
	 thats correct, I thought about the coloured patterns.
They are realy easy, but have a special power too ;-)

---
Stefan Pendl


> -----Ursprungliche Nachricht-----
> Von: libertybasic@yahoogroups.com
>
> Thanks for the 'plug' to my site Stefan. I could not quite follow
> the ideas behind this thread. Getting too old!
>
> I think you refer to the variety of old coloured patterns I
> upgraded from the distant past on my site, one of which you
> provided great help in showing me how to adapt recursive
> PROCedures to LB..
>
> Gordon S.






___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de

#28632 From: "xjoelmrax" <jwalker@...>
Date: Tue Nov 1, 2005 10:46 pm
Subject: Memory Access in LB 4.02 - My bad
xjoelmrax
Send Email Send Email
 
Well, I'm pretty sure that this was a subject a few weeks ago and,
thinking that I would never need it, I deleted the e-mails... my bad!

My requirement is to read and write from/to memory addresses. The QB45
code in use now (used to set up an A/D card) is:

caddr% = addr% + 9   '   caddr% = card address
OUT caddr%, 0    ' control register
GOSUB iwait1

saddr% = addr% + 8
status=inp(saddr%) : print stat

The help file seems to only have port related I/O for the INP and OUT
functions. I suspect that I am in DLL land.. would appreciate some
guidance.

Thanks

#28633 From: "pendl2megabit" <pendl2megabit@...>
Date: Tue Nov 1, 2005 11:50 pm
Subject: AW: Memory Access in LB 4.02 - My bad
pendl2megabit
Send Email Send Email
 
Joel,
	 the card address is the base addres of the cards port, which is used in the
inp() and out commands of LB, too.
Have you already tried to use the code as is ???

---
Stefan Pendl


> -----Ursprüngliche Nachricht-----
> Von: libertybasic@yahoogroups.com
>
> Well, I'm pretty sure that this was a subject a few weeks ago and,
> thinking that I would never need it, I deleted the e-mails... my bad!
>
> My requirement is to read and write from/to memory addresses. The QB45
> code in use now (used to set up an A/D card) is:
>
> caddr% = addr% + 9   '   caddr% = card address
> OUT caddr%, 0    ' control register
> GOSUB iwait1
>
> saddr% = addr% + 8
> status=inp(saddr%) : print stat
>
> The help file seems to only have port related I/O for the INP and OUT
> functions. I suspect that I am in DLL land.. would appreciate some
> guidance.
>
> Thanks






___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de

#28634 From: "Richard Thomas" <rthomas@...>
Date: Tue Nov 1, 2005 11:55 pm
Subject: DownloadToFileA Problem
sandworker
Send Email Send Email
 
Hi gang;
This piece of code works fine in another program.  I copied it and made a
few modifications but it is broken now!  I've tried changing about
everything I can think of but keep getting a "Syntax Error" message in the
return code.
Could someone pop the following in LB and see if it works, it should, but it
doesn't.  I'm missing something, but I can't figure out what.
Rick:
[DownloadToFileABlock]

notice "Enter Block"

S.OK=0

open "URLmon" for dll as #url

urlfile$ = "http://www.yahoo.com"

localfile$ = "c:\DownloadPage.txt"

calldll #url, "URLDownloadToFileA", _

0 as long, _ 'null

urlfile$ as ptr, _

localfile$ as ptr, _

0 as long, _ 'reserved, must be 0

0 as long, _ 'callback address, can be 0

ret as long

if ret<>S.OK then

notice " call failed "

else

notice "Downloaded OK"

end if

[quit]

close #url

notice "done"

end

#28635 From: Alyce Watson <alycewatson@...>
Date: Wed Nov 2, 2005 12:04 am
Subject: Re: DownloadToFileA Problem
alyce_dubya
Send Email Send Email
 
At 05:55 PM 11/1/2005, you wrote:

>  keep getting a "Syntax Error" message in the
>return code.
>Could someone pop the following in LB and see if it works, it should, but it
>doesn't.  I'm missing something, but I can't figure out what.
>Rick:

Without testing the code, I can make this observation. API calls must be on
a single line. You can split them with the line continuation character as
you have done, but you can't have blank lines in between the split lines.
This kind of thing happens when you copy and paste from helpfiles.

-Alyce



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.12.6/152 - Release Date: 10/31/2005

#28636 From: "Richard Thomas" <rthomas@...>
Date: Wed Nov 2, 2005 12:23 am
Subject: Re: DownloadToFileA Problem
sandworker
Send Email Send Email
 
Hi Alice;
I can't find any blank lines, here is the code copied from the LB Editor
this time, last one was from WordPad.  Note anything that show as a blank
line and I'll re-code it.
Rick.
[DownloadToFileABlock]
notice "Enter Block"
S.OK=0
open "URLmon" for dll as #url
urlfile$ = "http://www.yahoo.com"
localfile$ = "C:\DownloadPage.txt"
calldll #url, "URLDownloadToFileA", _
  0 as long, _
  urlfile$ as ptr, _
  localfile$ as ptr, _
  0 as long, _
  0 as long, _
  ret as long
if ret<> S.OK then
notice "Download Failed"
else
notice "Download OK"
end if
[quit]
close #url
end

----- Original Message -----
From: "Alyce Watson" <alycewatson@...>
To: <libertybasic@yahoogroups.com>
Sent: Tuesday, November 01, 2005 7:04 PM
Subject: Re: [libertybasic] DownloadToFileA Problem


> At 05:55 PM 11/1/2005, you wrote:
>
>>  keep getting a "Syntax Error" message in the
>>return code.
>>Could someone pop the following in LB and see if it works, it should, but
>>it
>>doesn't.  I'm missing something, but I can't figure out what.
>>Rick:
>
> Without testing the code, I can make this observation. API calls must be
> on
> a single line. You can split them with the line continuation character as
> you have done, but you can't have blank lines in between the split lines.
> This kind of thing happens when you copy and paste from helpfiles.
>
> -Alyce
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.1.362 / Virus Database: 267.12.6/152 - Release Date: 10/31/2005
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

#28637 From: "kepu_k" <keijoko@...>
Date: Wed Nov 2, 2005 1:48 am
Subject: Re: new LB user - have not purchase yet
kepu_k
Send Email Send Email
 
Hmmm....
Stefan,
"goto [wait here}"
is a 'command' to go label: "[wait here]", not a "wait" command
  and Amin has used it as a continous loop for return to
  a certain point in the program.
(so it can't be replaced....)

--- In libertybasic@yahoogroups.com, "pendl2megabit"
<pendl2megabit@y...> wrote:
>
> Amin,
>  "goto [waitHere]" can be replaced by a single "WAIT".
> This will save your program from jumping around ;-)
>
> ---
> Stefan Pendl
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: libertybasic@yahoogroups.com
> >
> > Hello - I too was a QBX user -  Now am trying to be as
> > proficient in LB.  See the code below for snippets of
> > plotting points.
> >
> > I too am in Aerospace, not retired yet - still a long
> > way to go.
> >
> > Cheers,
> > Amin
> >
> ---snip
>
>
>
>
>
>
> ___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de
>

#28638 From: Alyce Watson <alycewatson@...>
Date: Wed Nov 2, 2005 11:24 am
Subject: Re: DownloadToFileA Problem
alyce_dubya
Send Email Send Email
 
At 06:23 PM 11/1/2005, you wrote:

>Hi Alice;
>I can't find any blank lines, here is the code copied from the LB Editor
>this time, last one was from WordPad.  Note anything that show as a blank
>line and I'll re-code it.
>Rick.
>[DownloadToFileABlock]
>notice "Enter Block"
>S.OK=0
>open "URLmon" for dll as #url
>urlfile$ = "http://www.yahoo.com"

I don't know why this doesn't work, sorry. Have you looked at the articles
here?

http://babek.info/libertybasicfiles/lbnews/nl136/api.htm

Issue 136 has several articles on downloading from the internet. In
addition to the several articles in 136, there is another terrific demo by
Brent in 137.

-Alyce



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.12.6/152 - Release Date: 10/31/2005

#28639 From: "Alyce" <alycewatson@...>
Date: Wed Nov 2, 2005 1:14 pm
Subject: Re: Up the creek---again!
alyce_dubya
Send Email Send Email
 
--- In libertybasic@yahoogroups.com, "Filmore Breazeal"
<dirty_mucker@s...> wrote:
>
> Is it possible to change a .bmp file into a .txt file?
> I need for my program to read the text on a .bmp file. Anyone have
any
> thoughts on this problem?
>

John White has provided a DLL for OCR (optical character recognition.)
It's available in the DLL folder of the lbfiles group, here:

http://groups.yahoo.com/group/lbfiles/

-Alyce

#28640 From: Günter Dannhauer <gunter@...>
Date: Wed Nov 2, 2005 1:19 pm
Subject: Retrieve cells from open Excel file
dannhauer2000
Send Email Send Email
 
Hello I was wondering if there is an easy solution to retrieve the value
of an open excel file. I would have to retreive that every 10 seconds or
so since it changes frequently.

Thanks
Gunter

#28641 From: Alyce Watson <alycewatson@...>
Date: Wed Nov 2, 2005 1:32 pm
Subject: Re: Retrieve cells from open Excel file
alyce_dubya
Send Email Send Email
 
At 07:19 AM 11/2/2005, you wrote:

>Hello I was wondering if there is an easy solution to retrieve the value
>of an open excel file. I would have to retreive that every 10 seconds or
>so since it changes frequently.
>
>Thanks
>Gunter

I just answered this query here:
http://libertybasic.conforums.com/index.cgi?board=novice&action=display&num=1130\
919651

It's easier to follow discussions if you keep them on one forum or the
other. It's less confusing that way.

Thanks,
Alyce




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.12.6/152 - Release Date: 10/31/2005

#28642 From: "johncarriezack" <jmont@...>
Date: Wed Nov 2, 2005 2:17 pm
Subject: precision timing
johncarriezack
Send Email Send Email
 
I am interested in getting accurate timing of responses made by user in a LB
program.
Using dll calls, you can get timing in milliseconds.  But that isn't the same as
millisecond
accuracy.  I am told that things going on in the windows environment can
introduce a
great deal of noise.  For example, if I wanted to know exactly how long it took
a user to
make a response, and she made it at 400 msec after the onset of some stimulus,
but
windows was doing something that prevented the program from probing the keyboard
between 390 and 430 msec after the stimulus, then the result would be off by
that much.

Does anyone have any advice on things that can be done to minimize the amount of
this
kind of noise?  Or does anyone have any specifics about how bad the timing is
likely to be?

Thanks in advance!  -John

#28643 From: "Brian Schmalz" <brian.s@...>
Date: Wed Nov 2, 2005 2:45 pm
Subject: RE: precision timing
brian_schmalz
Send Email Send Email
 
John,
	 A couple of things -

1) I used to work at a job building flight simulators for NASA
experiments - I was one of the 2 'implementers' in a group of 20
Industrial Psychology PHDs. They designed the experiments for the
pilots, we wrote the software. We spent all day measuring exactly what
you're talking about, on hundreds of variables over the course of
(sometimes) hours long flights. We did not use Windows. <grin> We used
UNIX (SGI graphics computers running IRIX) and we had special software
that allowed us to time responses exactly (well, within a millisecond or
two of accuracy). Another thing we did was to measure the same
stimulus-response multiple times and average the results.

2) I'm currently working on a project for work (different job now) that
has a PC running a Windows Program that acts as the GUI for a big
machine. The machine is run by a different computer that does NOT run
Windows primarily because of the timing accuracy issues you speak of.
Our GUI application on the PC can stall for up to 3 seconds at a time
while it reads/write from disk or handles network traffic. That is
probably huge compared to the normal timing delays that can be seen
under Windows, especially on a fast machine. But you can easily see 20ms
to 100ms of pause in your programs as Windows goes and does other things
and doesn't give you any CPU cycles to check the clock.

Now, there are ways around this. I've heard of special drivers that run
'inside' the Windows OS (they are installed in Ring 0, if that means
anything to you) that can interrupt the Windows OS processes to gain
extremely accurate and tight timing information - specifically I've seen
them used for Windows PC based CNC machine control (where you need to
output commands to a motor through the parallel port at up to 100KHz
rates and with very little jitter). See the program called Mach4 as a
prime example. So there definitely are ways of generating accurate
timing information under Windows. The question is how difficult is it to
do for your application and how much pain are you willing to go through
to get that accuracy.

Another data point - I built a hardware testing application using LB
running under Windows XP that had to turn several AC motors on and off,
and measure timings between switch closures. We needed to prove that the
hardware we had designed would withstand 100,000 cycles of use, and we
didn't want to pay an intern to do it. (Each cycle was over a minute
long) So we came up with this very simple LB app that did it. I used the
normal Windows system timer to time the switches. I bought a fast
machine and ran nothing but the LB app on it, and I got very consistent
timings (the normal Windows system timer has an 18ms resolution, I
think, and I never saw it miss an 18ms tick from my LB app). One thing
that I did was that during the critical timing parts of the program, I
didn't use any SCAN or WAIT commands, thus not letting Windows do its
normal event processing. I also made sure I wasn't doing any network or
disk activity, and it seems to run quite well. But no guarantees. :)

*Brian

-----Original Message-----
From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com]
On Behalf Of johncarriezack
Sent: Wednesday, November 02, 2005 8:18 AM
To: libertybasic@yahoogroups.com
Subject: [libertybasic] precision timing

I am interested in getting accurate timing of responses made by user in
a LB program.
Using dll calls, you can get timing in milliseconds.  But that isn't the
same as millisecond
accuracy.  I am told that things going on in the windows environment can
introduce a
great deal of noise.  For example, if I wanted to know exactly how long
it took a user to
make a response, and she made it at 400 msec after the onset of some
stimulus, but
windows was doing something that prevented the program from probing the
keyboard
between 390 and 430 msec after the stimulus, then the result would be
off by that much.

Does anyone have any advice on things that can be done to minimize the
amount of this
kind of noise?  Or does anyone have any specifics about how bad the
timing is likely to be?

Thanks in advance!  -John







Yahoo! Groups Links

#28644 From: "ralph_iden_fsc" <ralph_iden_fsc@...>
Date: Wed Nov 2, 2005 3:43 pm
Subject: Re: precision timing
ralph_iden_fsc
Send Email Send Email
 
--- In libertybasic@yahoogroups.com, "johncarriezack" <jmont@u...>
wrote:
>
> I am interested in getting accurate timing of responses made by
user in a LB program.
> Using dll calls, you can get timing in milliseconds.  But that
isn't the same as millisecond
> accuracy.  I am told that things going on in the windows
environment can introduce a
> great deal of noise.  For example, if I wanted to know exactly how
long it took a user to
> make a response, and she made it at 400 msec after the onset of
some stimulus, but
> windows was doing something that prevented the program from
probing the keyboard
> between 390 and 430 msec after the stimulus, then the result would
be off by that much.
>
> Does anyone have any advice on things that can be done to minimize
the amount of this
> kind of noise?  Or does anyone have any specifics about how bad
the timing is likely to be?
>
> Thanks in advance!  -John
>
Windows doesn't probe or poll the keyboard rather the keyboard is
interrupt driven.  The keyboard event (keydown, keyup, etc.)
contains a timestamp with a 1 millisecond resolution.  What that
means is that you may not get the keyboard event right away (as you
noted), but the time the key was pressed or released will be
contained in the event data.

If you want to record the elapsed time between a stimulus and a
response, you can get the system time in milliseconds, present the
stimulus, the user will press (or release) a key, you will wait for
the keyboard event, and you will look at the timestamp in the event
and subtract the starting time of the stimulus.

When I get back from my trip, I'll look around and see if I have any
code that demonstrates this.

#28645 From: BILL EVENSON <majorwar@...>
Date: Wed Nov 2, 2005 4:51 pm
Subject: Re: Re: Number ranges
majorwar
Send Email Send Email
 
I actually figured this one out. In between each of
those numbers I put >= and it fixed my problem.
Thanks!!

--- Joe <jj.jackson@...> wrote:

> Also - looks as though a score of 60 qualifies as a
> "D" - in the
> range 60-69  ALSO qualifies as an "F" - less than
> 61.
>
> maybe the "F" grade is a score less than 60?
>
>
>
>
> --- In libertybasic@yahoogroups.com, "bill"
> <majorwar@y...> wrote:
> >
> > Hi,
> >   I am a college student and I am new to Leberty
> Basic. I am
> writing
> > a program that is supposed to find the averages of
> three scores for
> > 30 different students and print out a letter
> grade. The problem I
> am
> > having is that I am not sure how to put in a
> number range, IE. a
> > letter grade of "B" is a number between 80 and 90.
> Any suggestions?
> >
> > REM Bill E
> > rem Project Delta
> > rem OCT 26 2005
> > rem this program will take 3 grades per
> student,average them, and
> > then provide an output with the name and letter
> grade for each
> student
> > rem VAR studentname$= The array holding the
> student names
> > rem VAR studentscore= The array holding the
> students average
> > rem VAR student$= The students namerem VAR
> c=counter
> > rem VAR average = average of three scores
> > rem VAR x=Variable number on counter
> > rem clear screen
> > cls
> > rem Making the arrays
> > dim studentname$(30)
> > dim studentscore(30)
> > dim grade$(30)
> > rem input student names
> > input "Enter student name:" ; student$
> > while student$ <> ""
> >     rem counter to tell us how many students we
> have processed
> >     let c = c+1
> >     cls
> >     input "Enter the first score:" ; score1
> >     cls
> >     input "Enter the second score:"; score2
> >     cls
> >     input "Enter the third score:"; score3
> >     let studentname$(c) = student$
> >     let average =(score1+score2+score3) /3
> >     let studentscore(c) =average
> >     cls
> >     input "Enter the next students name, or hit
> enter to
> continue:";
> > student$
> > wend
> > cls
> > for x = 1 to c
> >     GOSUB [grades]
> > print "                              BILLS GRADE
> > BOOK                                          "
> > print "Student",
> > print "Grade"
> > print studentname$(x), grade$(x)
> > print "                              BILLS GRADE
> > BOOK                                          "
> > print "Student",
> > print "Grade"
> > print studentname$(x), grade$(x)
> > next x
> > end
> >
> > [grades]
> >     if studentscore(x) <61 then
> >     grade$(x) = "F"
> > Else
> >     if studentscore(x) = 60 69 then
> >     grade$(x) = "D"
> >  END IF
> > END IF
> >     if studentscore(x) = 70  79 then
> >     grade$(x) = "C"
> >     Else
> >     if studentscore(x) = 80  89 then
> >     grade$(x) = "B"
> >  END IF
> > END IF
> >     if studentscore(x) >90 then
> >     grade$(x) = "A"
> >     Else
> >
> >     END IF
> > Return
> >
>
>
>
>
>
>





__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

#28646 From: BILL EVENSON <majorwar@...>
Date: Wed Nov 2, 2005 4:52 pm
Subject: Re: AW: Number ranges
majorwar
Send Email Send Email
 
I actually solved the problem by making it ">="  Thank
you!

--- pendl2megabit <pendl2megabit@...> wrote:

> Bill,
>  here is one solution for your problem.
>
> '---code start
> ' Bill E
> ' Project Delta
> ' OCT 26 2005
> ' this program will take 3 grades per
> student,average them, and
> ' then provide an output with the name and letter
> grade for each student
> ' VAR studentname$= The array holding the student
> names
> ' VAR studentscore= The array holding the students
> average
> ' VAR student$= The students name' VAR c=counter
> ' VAR average = average of three scores
> ' VAR x=Variable number on counter
> ' Making the arrays
> dim studentname$(30)
> dim studentscore(30)
> dim grade$(30)
> ' clear screen
> cls
> ' input student names
> input "Enter student name:" ; student$
> while student$ <> ""
>     ' counter to tell us how many students we have
> processed
>     let c = c+1
>     print
>     input "Enter the first score:" ; score1
>     print
>     input "Enter the second score:"; score2
>     print
>     input "Enter the third score:"; score3
>     ' calculate the average
>     let studentname$(c) = student$
>     let average =(score1+score2+score3) /3
>     let studentscore(c) =average
>     print
>     print "Enter the next students name"
>     input "or hit enter to continue:"; student$
>     cls
> wend
> print "                              BILLS GRADE
> BOOK"
> for x = 1 to c
>     GOSUB [grades]
>     print
>     print "Student", "Grade"
>     print studentname$(x), grade$(x)
> next x
> end
>
> [grades]
>     grade$(x) = "A"
>     if studentscore(x) < 90 then grade$(x) = "B"
>     if studentscore(x) < 80 then grade$(x) = "C"
>     if studentscore(x) < 70 then grade$(x) = "D"
>     if studentscore(x) < 60 then grade$(x) = "F"
> Return
> '---code end
>
> ---
> Stefan Pendl
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: libertybasic@yahoogroups.com
> >
> > Hi,
> >   I am a college student and I am new to Leberty
> Basic. I am writing
> > a program that is supposed to find the averages of
> three scores for
> > 30 different students and print out a letter
> grade. The problem I am
> > having is that I am not sure how to put in a
> number range, IE. a
> > letter grade of "B" is a number between 80 and 90.
> Any suggestions?
> >
> ---snip
>
>
>
>
>
>
>
___________________________________________________________
>
> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher
> kostenlos - Hier anmelden: http://mail.yahoo.de
>




__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

#28647 From: "Mike" <mike@...>
Date: Wed Nov 2, 2005 7:08 pm
Subject: Re: DownloadToFileA Problem
mike_ukmid
Send Email Send Email
 
--- In libertybasic@yahoogroups.com, "Richard Thomas" <rthomas@t...>
wrote:
>
> Hi gang;
> This piece of code works fine in another program.  I copied it and
made a
> few modifications but it is broken now!  I've tried changing about
> everything I can think of but keep getting a "Syntax Error"
message in the
> return code.
> Could someone pop the following in LB and see if it works, it
should, but it
> doesn't.  I'm missing something, but I can't figure out what.
> Rick:
> [DownloadToFileABlock]
>
> notice "Enter Block"
>
> S.OK=0
>
> open "URLmon" for dll as #url
>
> urlfile$ = "http://www.yahoo.com"
>
> localfile$ = "c:\DownloadPage.txt"
>
> calldll #url, "URLDownloadToFileA", _
>
> 0 as long, _ 'null
>
> urlfile$ as ptr, _
>
> localfile$ as ptr, _
>
> 0 as long, _ 'reserved, must be 0
>
> 0 as long, _ 'callback address, can be 0
>
> ret as long
>
> if ret<>S.OK then
>
> notice " call failed "
>
> else
>
> notice "Downloaded OK"
>
> end if
>
> [quit]
>
> close #url
>
> notice "done"
>
> end
>

Rick,
The code works ok if you specify a source file.
urlfile$ = "http://www.yahoo.com" is a web page not a file. I tried
the code and downloaded successfully index.htm, the first page of my
web site.
Change to urlfile$ = "http://www.libertybasic.com/index.htm" for
example and it works.

Mike.

#28648 From: "hugh_dad" <hughdad1@...>
Date: Wed Nov 2, 2005 6:57 pm
Subject: Wish list
hugh_dad
Send Email Send Email
 
Hi All, New to the list, new to LB although I have been working on a
self-inflicted project to the tune of about 1200 lines of code (so
far).

The project consists of minimal in-line code, with most of the work
being done by subroutines and functions. In the past, I worked with a
basic editor (known as AMOS) for the Amiga . It had the ability to
visually collapse the subs and functions until they needed to be
expanded to be looked at and/or worked on. As I recall, there was a
tool-bar icon to do this. I see no way to do this with LB. My question,
is there a wish list for future function in LB? Do we go directly to
the creator of LB with such ideas/questions? Thanks for any input.

Hugh

#28649 From: Alyce Watson <alycewatson@...>
Date: Wed Nov 2, 2005 7:29 pm
Subject: Re: Wish list
alyce_dubya
Send Email Send Email
 
At 12:57 PM 11/2/2005, you wrote:
>. My question,
>is there a wish list for future function in LB? Do we go directly to
>the creator of LB with such ideas/questions? Thanks for any input.
>
>Hugh


http://libertybasic.conforums.com/index.cgi?board=wishlist


-Alyce





--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.12.7/157 - Release Date: 11/2/2005

#28650 From: "deqh" <deqh@...>
Date: Wed Nov 2, 2005 8:27 pm
Subject: Using liberty for parallel/serial port interfacing
deqh
Send Email Send Email
 
I am new to liberty and still using the free version. I would like to
find an answer to my question before I can decide to buy the software.


I am trying to use liberty for computer peripheral interface. For
example using the parallel or serial ports of a computer to turn on or
off lights or other electric products using relays.
I searched google and other search engines but couldn't find any
examples.
Does anyone have code I can try to do this.


Thanks.

#28651 From: "Brian Schmalz" <brian.s@...>
Date: Wed Nov 2, 2005 8:39 pm
Subject: RE: Using liberty for parallel/serial port interfacing
brian_schmalz
Send Email Send Email
 
Hmm. That's funny. Choose the first hit when you Google for "parallel
port Liberty Basic". Example code to do what you want, I believe. :)

*Brian

-----Original Message-----
From: libertybasic@yahoogroups.com [mailto:libertybasic@yahoogroups.com]
On Behalf Of deqh
Sent: Wednesday, November 02, 2005 2:28 PM
To: libertybasic@yahoogroups.com
Subject: [libertybasic] Using liberty for parallel/serial port
interfacing

I am new to liberty and still using the free version. I would like to
find an answer to my question before I can decide to buy the software.


I am trying to use liberty for computer peripheral interface. For
example using the parallel or serial ports of a computer to turn on or
off lights or other electric products using relays.
I searched google and other search engines but couldn't find any
examples.
Does anyone have code I can try to do this.


Thanks.







Yahoo! Groups Links

#28652 From: Patric t'Kindt <tkpatric@...>
Date: Wed Nov 2, 2005 9:00 pm
Subject: Re: Using liberty for parallel/serial port interfacing
tkpatric
Send Email Send Email
 
Hello,
you can download a complete system with scheme and programs on 
http://members.lycos.nl/tkpatric/   and open doc.zip.
Many greetings,
Patric

deqh <deqh@...> wrote:
I am new to liberty and still using the free version. I would like to
find an answer to my question before I can decide to buy the software.


I am trying to use liberty for computer peripheral interface. For
example using the parallel or serial ports of a computer to turn on or
off lights or other electric products using relays.
I searched google and other search engines but couldn't find any
examples.
Does anyone have code I can try to do this.


Thanks.







Yahoo! Groups Links








---------------------------------
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail

[Non-text portions of this message have been removed]

#28653 From: Chergarj@...
Date: Wed Nov 2, 2005 5:29 pm
Subject: Re: Wish list
gjosefc
Send Email Send Email
 
In a message dated 11/02/2005 11:21:38 AM Pacific Standard Time,
hughdad1@... writes:
> The project consists of minimal in-line code, with most of the work
> being done by subroutines and functions. In the past, I worked with a
> basic editor (known as AMOS) for the Amiga . It had the ability to
> visually collapse the subs and functions until they needed to be
> expanded to be looked at and/or worked on. As I recall, there was a
> tool-bar icon to do this. I see no way to do this with LB. My question,
> is there a wish list for future function in LB? Do we go directly to
> the creator of LB with such ideas/questions? Thanks for any input.
>
> Hugh

You could describe what you would like here, or directly to Carl Gundel, the
creator of Liberty BASIC  or join the ConForums for Liberty BASIC and there is
a board there for "Wish List".

Actualy, from what I can understand about what you want to do with functions
and subroutines, that reminds me of QBasic; and that was one feature of QBasic
that I hated; and just another reason why I like LB much more than QBAsic.
Not having that feature, LB is much easier to use and learn.

G               C


[Non-text portions of this message have been removed]

#28654 From: John Fisher <taunton@...>
Date: Wed Nov 2, 2005 10:50 pm
Subject: Re: Using liberty for parallel/serial port interfacing
tenochtitlanuk
Send Email Send Email
 
Look in
http://atschool.eduweb.co.uk/taunton/LB/indexlb.html (lot of my progs) or
http://atschool.eduweb.co.uk/taunton/disco-1.htm to see what i get up to
with them!

I do quite a lot of interfacing via serial, parallel & USB (Welleman
kit) interfaces

#28655 From: "computersrcool591" <computersrcool591@...>
Date: Wed Nov 2, 2005 10:53 pm
Subject: reading large files
computersrco...
Send Email Send Email
 
Is there a way in LB to take a text file consisting of about 175,000
words and make it into some format so that a work could be quickly
found?  It could be broken up into smaller files.

Thanks in advance :P

#28656 From: "pendl2megabit" <pendl2megabit@...>
Date: Thu Nov 3, 2005 12:25 am
Subject: AW: precision timing
pendl2megabit
Send Email Send Email
 
John,
	 you can set the thread priority to the highest value to get more accurate
results.

'---code start
     calldll #kernel32, "GetCurrentThread", _
         hThread as ulong

     calldll #kernel32, "GetThreadPriority", _
         hThread      as ulong, _
         nOldPriority as ulong

     print
     print "Default priority: "; nOldPriority

     nPriority = _THREAD_PRIORITY_HIGHEST

     calldll #kernel32, "SetThreadPriority", _
         hThread   as ulong, _
         nPriority as ulong, _
         result    as boolean

     calldll #kernel32, "GetThreadPriority", _
         hThread      as ulong, _
         nNewPriority as ulong

     print
     print "Current priority: "; nNewPriority

     calldll #kernel32, "SetThreadPriority", _
         hThread      as ulong, _
         nOldPriority as ulong, _
         result       as boolean
end
'---code end

---
Stefan Pendl


> -----Ursprüngliche Nachricht-----
> Von: libertybasic@yahoogroups.com
>
> I am interested in getting accurate timing of responses made by
> user in a LB program.
> Using dll calls, you can get timing in milliseconds.  But that
> isn't the same as millisecond
> accuracy.  I am told that things going on in the windows
> environment can introduce a
> great deal of noise.  For example, if I wanted to know exactly
> how long it took a user to
> make a response, and she made it at 400 msec after the onset of
> some stimulus, but
> windows was doing something that prevented the program from
> probing the keyboard
> between 390 and 430 msec after the stimulus, then the result
> would be off by that much.
>
> Does anyone have any advice on things that can be done to
> minimize the amount of this
> kind of noise?  Or does anyone have any specifics about how bad
> the timing is likely to be?
>
> Thanks in advance!  -John






___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de

#28657 From: "pendl2megabit" <pendl2megabit@...>
Date: Thu Nov 3, 2005 12:33 am
Subject: AW: new LB user - have not purchase yet
pendl2megabit
Send Email Send Email
 
Hi,
	 I know what the line means ;-)
I noticed, that the contents of the branch was a single "wait" statement.

This has the same effect as replacing "goto [wait_here]" with "wait".

I realy do not know, why people tend to jump around in their code, when a
single wait command will do the trick ???

I am not against the use of goto, but the cases where it is realy needed are
rare.

Instead of using:
	 if x = y then goto [skip]

I prefere:
	 if x <> y then
	   '...
	 end if

---
Stefan Pendl


> -----Ursprüngliche Nachricht-----
> Von: libertybasic@yahoogroups.com
>
> Hmmm....
> Stefan,
> "goto [wait here}"
> is a 'command' to go label: "[wait here]", not a "wait" command
>  and Amin has used it as a continous loop for return to
>  a certain point in the program.
> (so it can't be replaced....)






___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de

Messages 28628 - 28657 of 46476   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help