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.

Newcomers DBPro Corner / Can I print the name of the dba that I am currently running in the program ??

Author
Message
Newbie5UK
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 22nd Mar 2006 01:07
I want to have the file name of the program I am runnign displayed on the top line of the program as it's running.

Any ideas how to achieve this ?

i.e on the top of the screen.....

Super Harrier v10.dba
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 22nd Mar 2006 10:48 Edited at: 22nd Mar 2006 10:49
PRINT "I am Project X."

[EDIT]
PRINT "Super Harrier v10.dba"

If this is not what you mean then please be more specific.

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 22nd Mar 2006 10:50 Edited at: 22nd Mar 2006 10:57
text 0,0,"Super Harrier v10.dba"

but if you have to ask then you aint ready to code anything like "Super Harrier v10.dba" anyway, putting text onto the screen is the simplest bit of code you can write, if thats beyond you then you maybe should go through some tutorials first.

@SirFire: print is ok, but if you use it inside a loop (like the main loop) it will end up at the bottom of the screen since print throws a new line at the end of each text message unless you re-position it with the cursor command.




I don`t care what you say, theres no way the commander of a Kamakasi Squadron got promoted up through the ranks.
Euphoria
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: United Kingdom
Posted: 22nd Mar 2006 12:06 Edited at: 22nd Mar 2006 12:11
print appname$()

will display the current executable file that is running.

As a program is compiled into a single executable I don't think there is anyway of displaying which 'source' file you are currently in, infact thinking about it that is impossible as a program may well be jumping in and out of a function held in a seperate source file continuosly throughout program execution.....Unless there is anyway of interrigating the debugger, which is bugged so that might not be a good idea either.....ok I'm over thinking now.

Only way I can think of is to flag each source file and manually print out its name (see above posts) if anything in it is executed prior to the next sync.

Hope that helps
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 22nd Mar 2006 14:15
use SET CURSOR X,Y prior to print statement to keep it in place

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 22nd Mar 2006 14:35
Quote: "print appname$()

will display the current executable file that is running"


and heres where my head starts to hurt , all that will do is print the name of the program currently running, since you wrote the program you know the name, so why go to the trouble of using appname$ (intended for screensavers iirc) when you can just put in the name of the app in plain text?, and why do people keep using print rather than text?, two commands to position text with print (set cursor and print), one command with text (text), weird



I don`t care what you say, theres no way the commander of a Kamakasi Squadron got promoted up through the ranks.
Newbie5UK
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 22nd Mar 2006 15:17
Euphoria, thanks that's what I was after
Euphoria
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: United Kingdom
Posted: 22nd Mar 2006 15:51
yw NewbieSUK

Quote: "and heres where my head starts to hurt , all that will do is print the name of the program currently running, since you wrote the program you know the name, so why go to the trouble of using appname$ (intended for screensavers iirc) when you can just put in the name of the app in plain text?, and why do people keep using print rather than text?, two commands to position text with print (set cursor and print), one command with text (text), weird "


I'm also not sure as to how printing that is useful but I am sure NewbieSUK has a purpose for it.

print...text...just keeping it simple, I don't think using print or text is really the point here.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 23rd Mar 2006 02:58
warning to Newbie5UK to stop multiple posting.
the others have been locked, this one will remain open.
If this topic is posted again expect a temp ban

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 23rd Mar 2006 05:10
@me!

I am aware of the behavior of PRINT, I was just trying to keep it simple for illustrative purposes

Login to post a reply

Server time is: 2024-11-27 23:39:32
Your offset time is: 2024-11-27 23:39:32