The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Tue Sep 25, 2018 1:09 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: a smal problem
PostPosted: Thu Mar 24, 2005 3:04 am 
Offline
Initiate
Initiate

Joined: Wed Jun 11, 2003 4:31 am
Posts: 76
Am writting a prog in Basic, it ginves the following results on the screen, each time the incoming value is 0 like this:

Value = 0
Value = 0
Value = 0
Value = 0
Value = 0
Value = 0
Value = 0
Value = 0
.
.
.
.
.
and so on

and in case the Value changed to whatever so it shows like this:

Value = 34
Value = 65
Value = 76
Value = 12
Value = 98
Value = 456
Value = 9876
Value = 34543508790
Value = 4
.
.
.
.
.
.and so on

What I want this prog to do is to show me the value = 0 on the same line in the same place, I cant put a timer like becase I dont know whe 0 would come. and in case the value changed so continue the previous like this:

Value = 0 (should wait until a change happen)

Value = 3 (now the value changed so it working)
Value = 546
Value = 9561
Value = 321
Value = 357
Value = 56
Value = 951475
Value = 8


hope its clear, plz help (with CODE)as soon as poss


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 24, 2005 7:02 pm 
No, it's not really clear, but this might be what you mean:

pseudo-code:
Code:
get the value
print("Value = " & value)
LOOP
get the value
IF value != 0 THEN print("Value = " & value)
END LOOP


Top
  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 28, 2005 4:26 am 
Offline
Initiate
Initiate

Joined: Wed Jun 11, 2003 4:31 am
Posts: 76
pa3lsvt , THANK U...

sorry for the delay in replying.

its working now by using a variable as follows:

5 FLAG = 0
5000 IF FLAG = 0 then GOTO 5050 ELSE GOTO 5300
5050 PRINT "VALUE = 0 ", CR
5060 FLAG =1
5100 XBY(ADR1)=080H
5200 UO 1 : PRINT " VALUE = 0 ": UO 0
5300 GOTO 1000


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group