Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / sync and mid$ work for you here?

Author
Message
ICERGB
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 29th Jul 2003 13:32
DBPro4.1/DX9.0a/win98/Geforce4/AthlonP41800
Please remove the sync command near line 13 and you will find that the screen goes blank...

---------------------------------------------------------------------------------------------
Rem Project: tests


Rem ***** Main Source File *****
sync on

message$="How are you doing today:12"
temprepfind=-1
tempmessage=len(message$)
repeat
inc temprepfind
print mid$(message$,tempmessage-temprepfind)
sync
until mid$(message$,tempmessage-temprepfind)=":"
print
repfind$=right$(message$,temprepfind)
repfind=val(repfind$)

message$=left$(message$,tempmessage-temprepfind-1)
print repfind$
print repfind
print message$

sync

wait key
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jul 2003 15:28
A couple of people have already noted this one - the 'fix' is to put a couple of sync commands near the 'sync on' command.
Yuri
23
Years of Service
User Offline
Joined: 12th Jun 2003
Location: Italy
Posted: 29th Jul 2003 16:07
what's the problem with mid$()?
after placing 3 sync command after sync on command it worked very well

it displayed this:


that's correct for me.

CBMZone main administrator
http://www.cbmzone.com
ICERGB
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 30th Jul 2003 09:39
Well,
What do you know
worked like a charm

Thanks Much!!

Login to post a reply

Server time is: 2026-07-21 21:13:09
Your offset time is: 2026-07-21 21:13:09