MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Package - Module

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40408] Package - Module
  • From: Robert Pigeon <robert.pigeon at videotron.ca>
  • Date: Fri, 4 Apr 2003 01:22:50 -0500 (EST)
  • Reply-to: robert.pigeon at videotron.ca
  • Sender: owner-wri-mathgroup at wolfram.com

Good day,
	How can I "export" a variable from inside a Package-Module to a notebook ??
Here's what I'm trying to do:

In a Package I create a Module:

Begin["`Private`"]

line[im_] := Module[{i},
		For[i=1, i <= 1024, i++,
		line[i] = im[[1,2,i]]
		];
		];
Where "im" is a FITS image Imported with Verbose-> True.

Now, I want to have access to line[] in the notebook from where I called
line[].  It is not available, I get:
in>> line[1]
out >> line[1]
and not the list from the Module.

But if I program the same Module in the notebook, then I have access to
line[].
in >> line[1]
out >> the first line of the image imported as a list.

I know that it is probably a basic question on Packages and Module... but I
read THE "book" and two other books on programming Mathematica and there is
things that I still do not understand :)

Thanks,

Robert



  • Prev by Date: Re: Show graphics command
  • Next by Date: dynamic programming inside a function
  • Previous by thread: Re: Import - FITS
  • Next by thread: Re: Package - Module