I have read the manuals, and most of jsoftware.com without success. From
what I have found the manuals only explain the primitives, and verb
definitions. I don't want to write a verb that I have to pass arguments
to. I don't want to write a one line definition. I want to write a driver
function essentially. The function should have user prompts that explain
what type of data to enter ect. I want to write a script the equivalent of
this C code in J:
//Written in C
# include <stdio.h>
int main (void)
{
int i,x;
printf ("Enter a number:");
scanf("%d", &i);
x=call_on_function_that_I_still_have_to_write(i);
printf("%d", x);
return 0;
}
On 4/12/07, Björn Helgason <[EMAIL PROTECTED]> wrote:
As you know there is a difference between J in different environments as
well as if you are using GUI or Console.
As an example in the GUI environment you can type in an IJX window and get
results immediately on the screen.
Same is basically true in the Console window.
In GUI you open a script and you can send in lines to be executed bu using
run/line or CTRL+R
You can send in selections or the whole script for execution line by line.
When starting either GUI or console you can pipe in the scripts and it
gets
executed line by line.
You probably are best advised to start in GUI and test out sending lines
to
IJX for execution.
Go through some demos and labs and read some helps and manuals.
You may have a long time of enjoying this process.
2007/4/12, Amelia Stein <[EMAIL PROTECTED]>:
>
> I am new to J programming, and I don't quite understand script
files. How
> do you write the equivalent of a main function from C programming? I
> don't
> want to define a verb. I simply want to create a main program where I
can
> query the user and except user input.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
801 Grímsnes ,t-póst: [EMAIL PROTECTED]
Skype: gosiminn, gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming
Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
góður kennari getur stigið á tær án þess að glansinn fari af skónum
/|_ .-----------------------------------.
,' .\ / | Með léttri lund verður |
,--' _,' | Dagurinn í dag |
/ / | Enn betri en gærdagurinn |
( -. | `-----------------------------------'
| ) | (\_ _/)
(`-. '--.) (='.'=)
`. )----' (")_(")
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm