diff --git a/.vs/IntelFortranOneApiPlayground/v16/.suo b/.vs/IntelFortranOneApiPlayground/v16/.suo new file mode 100644 index 0000000..f1a6c98 Binary files /dev/null and b/.vs/IntelFortranOneApiPlayground/v16/.suo differ diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..5746887 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\C:\\Users\\tgdg\\Source\\Repos\\IntelFortranOneApiPlayground", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..ef7aeef Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/SinglyLinkedList/.vs/SinglyLinkedList/v16/.suo b/SinglyLinkedList/.vs/SinglyLinkedList/v16/.suo new file mode 100644 index 0000000..3265989 Binary files /dev/null and b/SinglyLinkedList/.vs/SinglyLinkedList/v16/.suo differ diff --git a/SinglyLinkedList/ReadMe.txt b/SinglyLinkedList/ReadMe.txt new file mode 100644 index 0000000..a764ce8 --- /dev/null +++ b/SinglyLinkedList/ReadMe.txt @@ -0,0 +1,25 @@ +======================================================================== + Fortran Console Application : "SinglyLinkedList" Project Overview +======================================================================== + +Intel(R) Fortran Console Application Wizard has created this +"SinglyLinkedList" project for you as a starting point. + +This file contains a summary of what you will find in each of the files +that make up your project. + +SinglyLinkedList.vfproj + This is the main project file for Fortran projects generated using an + Application Wizard. It contains information about the version of + Intel(R) Fortran that generated the file, and information about the + platforms, configurations, and project features selected with the + Application Wizard. + +SinglyLinkedList.f90 + This is the main source file for the Fortran Console application. + It contains the program entry point. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +///////////////////////////////////////////////////////////////////////////// diff --git a/SinglyLinkedList/SinglyLinkedList.f90 b/SinglyLinkedList/SinglyLinkedList.f90 new file mode 100644 index 0000000..838f5e8 --- /dev/null +++ b/SinglyLinkedList/SinglyLinkedList.f90 @@ -0,0 +1,8 @@ +PROGRAM main + USE mdl_node + IMPLICIT NONE + + TYPE(node) :: head + CALL head%new(1) + CALL head%describe() +END PROGRAM main \ No newline at end of file diff --git a/SinglyLinkedList/SinglyLinkedList.sln b/SinglyLinkedList/SinglyLinkedList.sln new file mode 100644 index 0000000..e88aac3 --- /dev/null +++ b/SinglyLinkedList/SinglyLinkedList.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32630.194 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "SinglyLinkedList", "SinglyLinkedList.vfproj", "{B9543C47-4998-4A86-BC91-7D822DCAFEDA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Debug|x64.ActiveCfg = Debug|x64 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Debug|x64.Build.0 = Debug|x64 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Debug|x86.ActiveCfg = Debug|Win32 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Debug|x86.Build.0 = Debug|Win32 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Release|x64.ActiveCfg = Release|x64 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Release|x64.Build.0 = Release|x64 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Release|x86.ActiveCfg = Release|Win32 + {B9543C47-4998-4A86-BC91-7D822DCAFEDA}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6DAEAEA7-283C-4058-887D-CD85B28F6D49} + EndGlobalSection +EndGlobal diff --git a/SinglyLinkedList/SinglyLinkedList.u2d b/SinglyLinkedList/SinglyLinkedList.u2d new file mode 100644 index 0000000..f0bb595 Binary files /dev/null and b/SinglyLinkedList/SinglyLinkedList.u2d differ diff --git a/SinglyLinkedList/SinglyLinkedList.vfproj b/SinglyLinkedList/SinglyLinkedList.vfproj new file mode 100644 index 0000000..154f4f8 --- /dev/null +++ b/SinglyLinkedList/SinglyLinkedList.vfproj @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SinglyLinkedList/mdl_node.f90 b/SinglyLinkedList/mdl_node.f90 new file mode 100644 index 0000000..d2d5973 --- /dev/null +++ b/SinglyLinkedList/mdl_node.f90 @@ -0,0 +1,28 @@ +MODULE mdl_node + IMPLICIT NONE + TYPE :: node + INTEGER :: value + TYPE(node), POINTER :: next + CONTAINS + PROCEDURE new => allocate_node + PROCEDURE describe => display_node_value + END TYPE + + CONTAINS + SUBROUTINE allocate_node(elem, num) + IMPLICIT NONE + CLASS(node) :: elem + INTEGER :: num + + elem%value = num + NULLIFY(elem%next) + + END SUBROUTINE + + SUBROUTINE display_node_value(elem) + IMPLICIT NONE + CLASS(node) :: elem + + WRITE(*, *) "Node's value: ", elem%value + END SUBROUTINE +END MODULE \ No newline at end of file