Do you have .Net Framework?

Everything else that doesn't fall into one of the other PB categories.

Do you have .Net Framework?

Yes. .Net Framework Version 1.0
0
No votes
Yes. .Net Framework Version 1.1
8
14%
Yes. .Net Framework Version 2.0
37
63%
No. I dont want to install it.
13
22%
No, but i am plannig to install it in the future
1
2%
 
Total votes: 59

Kaisen2100
Enthusiast
Enthusiast
Posts: 121
Joined: Fri May 28, 2004 4:16 pm
Location: Madeira Island, Portugal
Contact:

Post by Kaisen2100 »

why not to use a program that run in .net platform if you have it already installed? ... If you have .net you can run a .net program ... why not use the program? ... i don't know why :( ...
PureBasic File Relocator [NEW VERSION 1.1] ==> http://pbfilerelocator.atspace.com/
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

just a stupid question :oops:

how to know exactly the version of the framework installed on my system ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

One way: Go to control panel --> Add remove programs, and scroll until finding Net Framework.

I have 1.1, 1.1 hotfix and 2.0 - so it seems you can have several .nets and apps use the one they need?????
Dare2 cut down to size
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

so i have same as you.

i use also Paint.Net which is very good - and in my humble opinion it is quite fast.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> why not to use a program that run in .net platform if you have it already installed?

Two reasons:

(1) I only have it installed because an app installed it without my permission.
So next time I re-install the OS, it won't be installed, and if I've downloaded
lots of .Net apps then they will be useless to me. So I'd rather have apps that
don't need it.

(2) I often use apps on different versions of Windows, or for my father and
brother's PCs, and they don't have .Net installed. So there's no point in me
downloading a .Net app to share with them as they can't use it.

.Net is just a runtime like the Visual Basic runtimes. I don't want that, or need
it. It's why I bought PureBasic and use that instead of Visual Basic, so that
I never have to rely on a runtime again. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
TeddyLM
Enthusiast
Enthusiast
Posts: 133
Joined: Wed Apr 30, 2003 2:04 pm
Location: Germany (French expat)

Post by TeddyLM »

PB wrote:It's why I bought PureBasic and use that instead of Visual Basic, so that I never have to rely on a runtime again.
i agree with that!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Kaisen2100 wrote:why not to use a program that run in .net platform if you have it already installed? ... If you have .net you can run a .net program ... why not use the program? ... i don't know why :( ...
Because .Net applications are unnecessarily slow.
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

@Deem

Post by Nik »

Would it be possible to provide some tesr programs compiled with PB.Net best with Console only Support, I would like to test them on Mono for Mac and Mono for Linux but Mono for Mac doesn't include windows.forms.
It would also be nice if you could tell us a little bit more about the syntax changes which make PB OOP and make it possible to access the Framework
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

The syntax for dotnet apps is really complicated and imo undoable without a good IDE.

Like VS 2005 or VWD.
The integration of objectenumeration for (tool)tips/codesense is awesome.

You maybe compare the complexity with learning the winapi.
The IDE has learned me a lot and programming cusrve might be steep but after 6 a 12 months you'll get the hang of it.
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

TeddyLM wrote:
PB wrote:It's why I bought PureBasic and use that instead of Visual Basic, so that I never have to rely on a runtime again.
i agree with that!
If VB6 didn't s**** so much with it's stupid winapi support it would be fine for me to have a run-time.
VB6 (and 5) where so limitted, you can do about anything but not in a trivial way.
You people got spoiled with PureBasic, any command you enter it will be added by the system, like winapi calls for example.
No need to insert dumb declarations!!
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Well I was talking about the changes of the PureBasic Sytanx done by the PureBasic.Net Compiler not about c# or something...
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Because theres no Console-Library for PB.Net now, i had to use the .Net-commands: http://www.deeem2031.de/PB.Net/NetworkC ... onsole.exe

Code: Select all

If InitNetwork() = 0
  .System\Console\WriteLine("Can't initialize the network !")
  End
EndIf

Port = 6832

.System\Console\Write("Enter the ip: ")
ConnectionID = OpenNetworkConnection(.System\Console\ReadLine(), Port)
If ConnectionID
  .System\Console\WriteLine("Client connected To server...")
  
  SendNetworkString(ConnectionID, "An hello from a (.net) client ! :-)")
    
  .System\Console\WriteLine("A string has been sent To the server, please check it before quit...")
  
  CloseNetworkConnection(ConnectionID)
Else
  .System\Console\WriteLine("Can't find the server (Is it launched ?).")
EndIf
.System\Console\WriteLine("Press enter to quit")
.System\Console\ReadLine()
  
End
As Server you can use the NetworkServer.pb Example from PB4.0 (This is the NetworkClient.pb Example modified for console-use)

For PB.Net you don't have to change the syntax of your PB4.0 programs, there are just some more possibilities. So as you see in the upper example you can use a "." to access .Net-things. But as i said before this can change until release.

[EDIT]
Trond wrote:Because .Net applications are unnecessarily slow.
And how do you know? All my tests about speed are showing that PB.Net isn't slower than PB.
irc://irc.freenode.org/#purebasic
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Hi Deeem2031,

Can you suggest any good (and for dummies) tutorial sites on MSIL?
Dare2 cut down to size
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Thanks Deem the code runs fine on my Intel Mac using Mono, that's what I call cross platform^^

Looks nice, can you also tell us whether and if yes how it will be possible to create objects using PB.Net?

Btw: I have also looked into MSIL a few hours ago and I came up with a dirty compiling calculator, it's written in c++ since I'm on a Intel Mac and am waiting for PB 4.0 for Macs.

If someone is interested here is the code:

Code: Select all

#include <iostream>
#include <string>
#include <fstream>
using namespace std;


string description=
"Please write Commands and Numbers like this:\n"
"\n"
"\"!Command\"\n"
"\"Numberl\"\n"

"\"!end\" to quit";

string head=
".assembly extern mscorlib {}\n"
".assembly hello{}\n"
".method static void main()\n"
"{\n"
"    .entrypoint\n"
"    .maxstack 10\n"
"    .locals init (int32 result)\n";

string tail=
"    ret\n"
"}\n";

int main(int argc,const char* argv[])
{
	cout<<"Welcome to the compiling Calculator 0.0"<<endl;
	cout<<description<<endl;
	string Input="";
	unsigned int pushcount=0;
	fstream f;
    f.open("out.il", ios::out| ios::trunc);
	f<<head;
	while(true){
		cin>>Input;
		if (Input[0]=='!') {
			if(Input=="!end")break;
			if(Input=="!add")f<<"add\n";
			if(Input=="!mul")f<<"mul\n";
			if(Input=="!div")f<<"div\n";
			if(Input=="!show")f<<
		//	"stloc result\n"	
		//  "ldloc result \n"
            "box int32 \n"
            "call void [mscorlib]System.Console::WriteLine(object)\n";
		}
		else 
		{
			f<<"ldc.i4.s "<<Input<<endl;
			pushcount++;
		}
		
	};
    f<<""<<tail<<endl;
f.close();
return 0;
}
You can then compile with ilasm out.il
I used Mono so I don't know wether it works with .Net
Note: It's very primitive as you must type the commands so that you don't get a stack overflow or something like that, an example for some commands would be:
10
10
!add
2
!mul
4
!div
!show
Which will create MSIL Code which will output
((10+10)*2)/4=10
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Deeem2031 wrote:
Trond wrote:Because .Net applications are unnecessarily slow.
And how do you know?
Because all the .Net applications I've tried have been horribly slow compared to what they do. How do you know there's gravity?
Post Reply