From eaec4780d05e1e2f2b4e862b52ba40a98ee46c09 Mon Sep 17 00:00:00 2001 From: Euler-37 <64597797+Euler-37@users.noreply.github.com> Date: Sun, 31 Mar 2024 17:42:23 +0800 Subject: [PATCH] Update ch08-00-pointer.md --- src/ch08-00-pointer.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ch08-00-pointer.md b/src/ch08-00-pointer.md index ed65660..03029ae 100644 --- a/src/ch08-00-pointer.md +++ b/src/ch08-00-pointer.md @@ -110,7 +110,13 @@ end associate write(*,*)a ``` - 当我们具有一些比较层数比较深的自定义类型的时候,在代码中使用`associate`会大大提高代码的可读性 -- `associate`的不足之处就是同一个语句中不能连续定义,这一定程度的限制了该语句的灵活性 +- 同一个语句中不能连续定义 ``` fortran -associate(x=>pointer(1),x2=>x*x ) !错误 +associate(x=>point(1),x2=>x*x ) !错误 ``` +需要改成 +``` fortran +associate(x=>point(1)) +associate(x2=>x*x) +``` +这是`associate`结构的不足之处