# Question:Who can explain ´invalid left hand side in assignment´ within procedure

## Question:Who can explain ´invalid left hand side in assignment´ within procedure

Maple

Hi, in attached code pauldaas_05.mw, the procedure 'aFshear' and 'aFmoment' must be called within procedure ´aF0011´.

The procedures ´aF0011´, 'aFshear', 'aFmoment' build the matrixes R, C1 and C2 respectively.

Unfortunately ('aFshear' and 'aFmoment') gives 'Error, invalid left hand side in assignment'.

It is strange that ´aF0011´ can call them separately ('aFshear' or 'aFmoment') but not both ('aFshear' and 'aFmoment').

Maybe there should be an 'unassign' statement for 'L'  somewhere. I tried that but without result.

Is there anyone who can help me.

```restart: with(linalg): L:=Vector[row]([''RA'',''MA'',''thetaA'',''yA'',''RB'',''MB'',''thetaB'',''yB'']): R:=Matrix(0,8,0): C1:=Matrix(0,10,0): C2:=Matrix(0,10,0):```

```aF0011:=proc(nr,a,l,F,EI) local B,RA,MA,thetaA,yA,RB,MB,thetaB,yB,aF; global R; R:=extend(R,1,0,0); B[RA]:=0; B[MA]:=0; B[thetaA]:=F*(l-a)^2/(2*EI); B[yA]:=-F*(a^3-3*a*l^2+2*l^3)/(6*EI); B[RB]:=F; B[MB]:=-F*(l-a); B[thetaB]:=0; B[yB]:=0; B:=Matrix( [seq(B[i],i in [RA,MA,thetaA,yA,RB,MB,thetaB,yB])]); copyinto(B,R,nr,1); aFshear(nr,R);   #nested procedure aFmoment(nr,R);  #nested procedure end:```

```aFshear:=proc(nr,R) local i,c; global C1; C1:=extend(C1,1,0,0); R:=convert(R,Matrix); zip(assign,L,R[nr,..]); c[0]:=RA; c[1]:=0; c[2]:=0; c[3]:=0; c[4]:=-F; c[5]:=0; c[6]:=0; c[7]:=0; c[8]:=0; c[9]:=0; c:=Matrix([seq(c[i],i in [0,1,2,3,4,5,6,7,8,9])]); copyinto(c,C1,nr,1); end proc:```

```aFmoment:=proc(nr,R) local i,c; global C2; C2:=extend(C2,1,0,0); R:=convert(R,Matrix); zip(assign,L,R[nr,..]); c[0]:=MA; c[1]:=RA; c[2]:=0; c[3]:=0; c[4]:=0; c[5]:=-F; c[6]:=0; c[7]:=0; c[8]:=0; c[9]:=0; c:=Matrix([seq(c[i],i in [0,1,2,3,4,5,6,7,8,9])]); copyinto(c,C2,nr,1); end proc:```

```aF0011(1,a__1,l,F__1,EI): aF0011(2,a__2,l,F__2,EI): aF0011(3,a__3,l,F__3,EI): R:=convert(R,Matrix); C1:=convert(C1,Matrix); C2:=convert(C2,Matrix);```

```l:=8000: F__1:=15000: F__2:=20000: F__3:=35000: a__1:=2000: a__2:=2000: a__3:=6000: EI:=2E+5*2.49E+7: R; C1; C2;```

﻿