OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_trim.f90] - Rev 338

Compare with Previous | Blame | View Log

! Program to test the TRIM and REPEAT intrinsics.
program intrinsic_trim
  character(len=8) a
  character(len=4) b,work
  a='1234    '
  b=work(8,a)
  if (llt(b,"1234")) call abort()
  a='     '
  b=trim(a)
  if (b .gt. "") call abort()
  b='12'
  a=repeat(b,0)
  if (a .gt. "") call abort()
  a=repeat(b,2)
  if (a .ne. "12  12  ") call abort()
end

function work(i,a)
  integer i
  character(len=i) a
  character(len=4) work
  work = trim(a)
end

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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