-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a22a598
commit b1fc15c
Showing
10 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
## Historia | ||
|
||
- Lenguaje desarrollado por *IBM* en 1957 (65 años 🥳) | ||
|
||
- Primer lenguaje de alto nivel | ||
|
||
- Se desarrolló con enfoque en aplicaciones científicas e ingenieriles (muchos | ||
números) | ||
|
||
- Destaca en eficiencia de cómputo en operaciones vectoriales |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,4 @@ module oop | |
real :: x | ||
real :: y | ||
end type | ||
|
||
end module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
! Overload de operadores | ||
module oop | ||
implicit none | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
elemental function f(x) | ||
! Un procedimiento elemental significa que puede operarse en | ||
! vectores automaticamente (como numpy) | ||
! para ser elemental es requisito que sea puro | ||
module efun | ||
contains | ||
elemental function f(x) | ||
! Un procedimiento elemental significa que puede operarse en | ||
! vectores automaticamente (como numpy) | ||
! para ser elemental es requisito que sea puro | ||
implicit none | ||
real(8), intent(in) :: x | ||
real(8) :: f | ||
f = 2*x | ||
end function f | ||
end module efun | ||
|
||
program main | ||
use efun, only: f | ||
implicit none | ||
real(8), intent(in) :: x | ||
real(8) :: f | ||
f = 2*x | ||
end function f | ||
real(8) :: x, x2(3) | ||
|
||
x = 5 | ||
x2 = [1, 2, 3] | ||
|
||
print *, "Variable escalar: ", f(x) | ||
print *, "Variable vectorial: ", f(x2) | ||
end program main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters