Do you have .Net Framework?
-
Kaisen2100
- Enthusiast

- Posts: 121
- Joined: Fri May 28, 2004 4:16 pm
- Location: Madeira Island, Portugal
- Contact:
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/
> 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.
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.
"PureBasic won't be object oriented, period" - Fred.
@Deem
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
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
Visit www.sceneproject.org
-
Edwin Knoppert
- Addict

- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
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.
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

- Posts: 1073
- Joined: Fri Apr 25, 2003 11:13 pm
- Location: Netherlands
- Contact:
If VB6 didn't s**** so much with it's stupid winapi support it would be fine for me to have a run-time.TeddyLM wrote:i agree with that!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.
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!!
Well I was talking about the changes of the PureBasic Sytanx done by the PureBasic.Net Compiler not about c# or something...
Visit www.sceneproject.org
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
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]
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()
EndFor 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]
And how do you know? All my tests about speed are showing that PB.Net isn't slower than PB.Trond wrote:Because .Net applications are unnecessarily slow.
irc://irc.freenode.org/#purebasic
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:
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)*2)/4=10
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;
}
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:
Which will create MSIL Code which will output10
10
!add
2
!mul
4
!div
!show
((10+10)*2)/4=10
Visit www.sceneproject.org

