You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flang] Add runtime and lowering implementation for extended intrinsic PUTENV (#134412)
Implement extended intrinsic PUTENV, both function and subroutine forms.
Add PUTENV documentation to flang/docs/Intrinsics.md. Add functional and
semantic unit tests.
The passed string can be in the form "name=value" to set environment variable "name" to value "value". It can also be of the form "name=" to delete environment variable "name".
1063
+
1064
+
The environment variables set by PUTENV can be read by GET_ENVIRONMENT_VARIABLE.
1065
+
1066
+
#### Example
1067
+
```Fortran
1068
+
integer :: status
1069
+
1070
+
! Set variable my_var to value my_value
1071
+
putenv("my_var=my_value", status)
1072
+
1073
+
! Delete variable my_var
1074
+
putenv("my_var=")
1075
+
end
1076
+
```
1077
+
1043
1078
1044
1079
### Non-standard Intrinsics: RENAME
1045
1080
`RENAME(OLD, NEW[, STATUS])` renames/moves a file on the filesystem.
@@ -1094,7 +1129,7 @@ function form.
1094
1129
### Non-Standard Intrinsics: TIME
1095
1130
1096
1131
#### Description
1097
-
`TIME()` returns the current time of the system as a INTEGER(8).
1132
+
`TIME()` returns the current time of the system as a INTEGER(8).
1098
1133
1099
1134
#### Usage and Info
1100
1135
@@ -1269,7 +1304,7 @@ by `ISIZE`.
1269
1304
`COMPAR` function takes the addresses of element `A` and `B` and must return:
0 commit comments