OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [ken/] [cplx0.go] - Blame information for rev 700

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
2
 
3
// Copyright 2010 The Go Authors. All rights reserved.
4
// Use of this source code is governed by a BSD-style
5
// license that can be found in the LICENSE file.
6
 
7
package main
8
 
9
const (
10
        R = 5
11
        I = 6i
12
 
13
        C1 = R + I // ADD(5,6)
14
)
15
 
16
func doprint(c complex128) { println(c) }
17
 
18
func main() {
19
 
20
        // constants
21
        println(C1)
22
        doprint(C1)
23
 
24
        // variables
25
        c1 := C1
26
        println(c1)
27
        doprint(c1)
28
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.