Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 16th, 2005, 7:13 AM   #11
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
universal whut? Aint that uh ox-moron?

Panaceanish .. or Utopianish
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty
stevengs is offline   Reply With Quote
Old Aug 16th, 2005, 7:22 AM   #12
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
There isn't a universal low-level language. Microprocessor are hardware; their wiring and even their architectures and control approaches differ. One operates them by switching signals. This is the job of machine code and any microcode which underlies it.

There isn't a universal high-level language. People can't agree on how such things should be implemented. This isn't due purely to recalcitrance. Different approaches are better under different circumstances.

Imagine for one tiny fraction of a second that there were such a thing as that which you seek. There would be a forum for it here, and many other places on the 'net. Doesn't that sound reasonable? I suppose such a thing might be a lovely sight to behold, but if you wish in one hand and ....ummmmm, well, you know how it goes, and what fills up first.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 17th, 2005, 6:01 AM   #13
CodeJunkie
Programmer
 
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0 CodeJunkie is on a distinguished road
Ok .... I guess what im trying to ask is... Whenever i have written programs in C or in Java despite compiling them various diffrent ways, whenever i try to run these on a diffrent platform they fail.... with varying errors.....
I guess what im tyring to find out.. is that when you purchase an application and attempt to install it , when you click on the icon the computer doesn`t display that "Exception in thread etc" or "Please install such n such", I guess what im trying to achieve is to find a programming language that intergrates with most machines.... that does run, when the user clicks on the icon my program is compatable with there machine... Is this to much to ask?, How do developers get round these issues?
CodeJunkie is offline   Reply With Quote
Old Aug 17th, 2005, 6:45 AM   #14
stevengs
Professional Programmer
 
stevengs's Avatar
 
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4 stevengs is on a distinguished road
it is called 'porting' and it is something most programmers have to deal with (why do you think Java, with it's promises of portability, became so popular ). If you know ahead of time that your software will run on multiple platforms, you should plan for this. In C++, for example, stick with the standard (which will by no means make the program completely portable, but a lot easier than otherwise).

I wrote a dll that runs fine on most versions of Windows. Now, 13 months later (and I am the kind of fella that usually by noon can't remember what he had for breakfast ), someone wants to run it on CE. Uh-oh.. I used <vector> and <list> from the standard template library. Apparently, although standard, this is not gonna compile. Now I have to go back and replace those, so it is a damn good thing that I have a fairly well though out design and clean cut interfaces. One look in the class diagram and I know exactly what needs to be changed and where. (well, it is not THAT simple, but you get the idea )

Using Java is a big step towards portability in itself. (although other languages boast a high level of portability too ).

There are lots of websites that cover portability issues of the different languages on different platforms. Usually it is the same ol' - same ol'. Rarely does one find something truly 'new', so google around and you should find what you need.
__________________
-Steven
"Is this a piece of your brain?" - Basil Fawlty

Last edited by stevengs; Aug 17th, 2005 at 6:56 AM.
stevengs is offline   Reply With Quote
Old Aug 17th, 2005, 7:48 AM   #15
CodeJunkie
Programmer
 
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0 CodeJunkie is on a distinguished road
Cheers..
I do like java - And would prefer to stick with it, but as you say there promises of portability seem little more than promises.. I used the JavaC compiler ... But that only creates Java Byte code .. as you know will not run at all, without the user installing the latest JVM etc .. So recently switched to Visual Studio.Net this does compile to a better standard and seems to contain more of the resources, but i find it attempts to manafacture code.. And i find this annoying..(And sometimes still has issues - particulary when run as a windows application) Do you no of any better compilers?
CodeJunkie is offline   Reply With Quote
Old Aug 17th, 2005, 8:06 AM   #16
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
The problem is that you are wanting something so badly that you aren't listening to the answers, because they don't say what you want to hear. .NET is a MS thangy, even if someone is purporting to have a non-MS substitute for other machines. The best you can do is try to offload the problems to someone else, but you probably won't be happy with the results. THINGS ARE NOT CROSS-MACHINE COMPATIBLE. You gotta use an adapter, like for electricity in another country, and you can still draw sparks.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 17th, 2005, 8:30 AM   #17
CodeJunkie
Programmer
 
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0 CodeJunkie is on a distinguished road
ok.... point taken .... I am perhaps not listening fully...
Just find it amazing that a program cannot be written that will run on two diffrent machines with an identical o/s....
How would i conceive/code an adpater ... shorely the adapter would need to be an indepently executable program, otherwise the adapter would need an adapter and so on?
or am i way of the mark here?
How would you go about coding for i.e a simple example a "calculator" that you could then install onto a similair machine knowing it will run ok? what languages/compilers/adapters would you use and how? or is this feat impossible a lost cause - how do microsoft ensure compatability with there products - (maybe i need to learn the O/s inside and out) -
if this was the case how come viruses are so widely spread??
CodeJunkie is offline   Reply With Quote
Old Aug 17th, 2005, 9:20 AM   #18
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Quote:
Originally Posted by CodeJunkie
Just find it amazing that a program cannot be written that will run on two diffrent machines with an identical o/s....
With an identical OS? Now that is a surprise. What architecture do the machines use? What OS are they running? What language are you writing your apps in? And have you made sure you've got the latest framework/virtual machine/interpreter for both systems?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 17th, 2005, 9:52 AM   #19
CodeJunkie
Programmer
 
Join Date: Aug 2005
Location: England
Posts: 37
Rep Power: 0 CodeJunkie is on a distinguished road
Language : C
O/S : Xp both machines
Compiler/Interpreter : Visual Studio.Net
Error on target machine: (Application has generated an exception that could not be handled. Process id=0x8a8 (2216), Thread id=0x51c(1308). Ok to terminate, Cancel to debug)

P.s Was written as a Console App... Window Apps i have zero success !!!

(I just want it to run !!!!)
CodeJunkie is offline   Reply With Quote
Old Aug 17th, 2005, 10:18 AM   #20
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
So use C++, and put the bit that's breaking in a try/catch block. Then MessageBox the exception info so you can find out more.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC