- #1

- 38

- 0

**"Unclassifiable statement at (1)"**. I really don't understand why.

Code:

```
do t = 1, count
real(in(t)) = cos(2 * pi * f0 * t)
aimag(in(t))=sin(2 * pi * f0 * t)
end do
```

thanks.

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Fortran
- Thread starter xaratustra
- Start date

- #1

- 38

- 0

Code:

```
do t = 1, count
real(in(t)) = cos(2 * pi * f0 * t)
aimag(in(t))=sin(2 * pi * f0 * t)
end do
```

thanks.

- #2

AlephZero

Science Advisor

Homework Helper

- 7,002

- 293

This should work:

Code:

```
do t = 1, count
in(t) = ( cos(2 * pi * f0 * t) , sin(2 * pi * f0 * t) )
enddo
```

- #3

- 38

- 0

This should work:

Code:`do t = 1, count in(t) = ( cos(2 * pi * f0 * t) , sin(2 * pi * f0 * t) ) enddo`

sorry for late reply.

But unfortunately it doesn't work. Even in the following simple code:

Code:

```
program test
implicit none
integer::t
complex::in(4)
do t = 1, 4
in(t) = ( 2*t, 3*3 )
end do
end program test
```

gfortran gives the following result:

Code:

```
test.f95:6.18:
in(t) = ( 2*t, 3*3 )
1
Error: Expected a right parenthesis in expression at (1)
```

any ideas?

- #4

AlephZero

Science Advisor

Homework Helper

- 7,002

- 293

in(t) = (1.0, 2.0) should work for a constant value. Maybe it doesn't work for expressions.

- #5

- 38

- 0

Yes. works perfectly now.

many thanks.

many thanks.

Share: