@@ -28,19 +28,7 @@ Experimental
28
28
# ### Example
29
29
30
30
` ` ` fortran
31
- program demo_color
32
- use stdlib_ansi, only : fg_color_blue, style_bold, style_reset, ansi_code, &
33
- & operator(//), operator(+)
34
- implicit none
35
- type(ansi_code) :: highlight, reset
36
-
37
- print '(a)', highlight // "Dull text message" // reset
38
-
39
- highlight = fg_color_blue + style_bold
40
- reset = style_reset
41
-
42
- print '(a)', highlight // "Colorful text message" // reset
43
- end program demo_color
31
+ {!example/ansi/example_ansi_color.f90!}
44
32
` ` `
45
33
46
34
@@ -216,12 +204,7 @@ Experimental
216
204
# ### Example
217
205
218
206
` ` ` fortran
219
- program demo_string
220
- use stdlib_ansi, only : fg_color_green, style_reset, to_string
221
- implicit none
222
-
223
- print '(a)', to_string(fg_color_green) // "Colorized text message" // to_string(style_reset)
224
- end program demo_string
207
+ {!example/ansi/example_ansi_to_string.f90!}
225
208
` ` `
226
209
227
210
@@ -255,13 +238,7 @@ Experimental
255
238
# ### Example
256
239
257
240
` ` ` fortran
258
- program demo_combine
259
- use stdlib_ansi, only : fg_color_red, style_bold, ansi_code
260
- implicit none
261
- type(ansi_code) :: bold_red
262
-
263
- bold_red = fg_color_red + style_bold
264
- end program demo_combine
241
+ {!example/ansi/example_ansi_combine.f90!}
265
242
` ` `
266
243
267
244
@@ -295,10 +272,5 @@ Experimental
295
272
# ### Example
296
273
297
274
` ` ` fortran
298
- program demo_concat
299
- use stdlib_ansi, only : fg_color_red, style_reset, operator(//)
300
- implicit none
301
-
302
- print '(a)', fg_color_red // "Colorized text message" // style_reset
303
- end program demo_concat
275
+ {!example/ansi/example_ansi_concat.f90!}
304
276
` ` `
0 commit comments