Re: How to ...?

*To*: mathgroup at smc.vnet.net*Subject*: [mg36332] Re: [mg36309] How to ...?*From*: Soren Merser <merser at image.dk>*Date*: Mon, 2 Sep 2002 04:08:39 -0400 (EDT)*References*: <200208310525.BAA28658@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

try something like this: foo[x_] := Block[{y}, If[x > 0 && x < 6, y = x^2, If[x >= 6, y = x + 1]] ] for details look at: ?And ?If ?Block regards soren ----- Original Message ----- From: "Paskoski" <berlusconi_pagliusi at fis.unical.it> To: mathgroup at smc.vnet.net Subject: [mg36332] [mg36309] How to ...? > Dear MathGroup, > I'd like to use Mathematica 4.0 to write a function having different > expressions in different domain's intervals. > Let's say: > > F[x_]= x^2 if 0<x<6 > x+1 if x>=6 > > I know It's a stupid syntax problem, but I really do not know how/where to > search the solution on the Mathematica Book > > Thank you in advance, > > PasKo. > > >