image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old May 8th, 2004, 01:59 PM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
*nixgeek is on a distinguished road
new language

i've recently got interested in learning programming and i dled the demo of futureBASIC to learn how towrite my own code. however i am encountering some problems. whenever i write something like:

nomainwin
prompt "something"
end

it comes up with a error saying nomainwin and prompt are unreconiziable commands,same thing with notice

my second problem is it won't let me open a graphics window like:

open "my drawing area" for graphics as #graphwin

it comes up with open missing how??
if you can help me with my problems thank you very much
Reply With Quote
  #2  
Old May 14th, 2004, 03:53 PM
Will code Perl for Food.
 
Join Date: May 2004
Location: Montana
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
TMTOWTDI is on a distinguished road
Talking Solution

Hi, well, the first thing i'll say is that don't waste your time with a language like that. Depending on what OS you are running, and i would guess it's UNIX, i'd say learn perl, because i'm a Perl junky. I can help you learn it, my AIM name is hilleyatmsu and i would be more than happy to help you out with it. I'll give you a quick example of how to get a program running:
1. open your favorite non ritch text editor (pico on the command line works)
2. now type what's called the sha-bang line:
#!/usr/bin/perl
that should always be your first line in a perl program
3. do a hello world program:
print "hello, world!\n";
4. exit the text editor, saving the program as whatever you want but with the extenstion .pl, i'll call my program hello.pl
5. change permissions to run the program:
chmod a+x hello.pl
6. last, run the program:
./hello.pl
7. conclusion: you should see "hello, world!" printed. If so, enjoy perl.
If not, message me.
Have fun!
Reply With Quote
  #3  
Old May 14th, 2004, 07:20 PM
NSCoder
 
Join Date: Oct 2002
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
anarchie is on a distinguished road
The shebang line should be
#!/usr/bin/perl -w
The -w flag tells perl to report errors to you instead of silently ignoring them. This helps tremendously when debugging your program, which is pretty much all the time.

Oh, and I agree. BASIC sucks. You're better off with a language which doesn't have silly rules such as "If a function doesn't return a value, we call it a method, and you can't put parentheses around its arguments!"....
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 11:27 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.