Skip to content

Commit

Permalink
Merge pull request #1 from truongd8593/singly_linked_list
Browse files Browse the repository at this point in the history
first commit
  • Loading branch information
truongdangqe authored Sep 10, 2022
2 parents f5110ee + f7688fa commit a4b80ea
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 0 deletions.
Binary file added .vs/IntelFortranOneApiPlayground/v16/.suo
Binary file not shown.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\C:\\Users\\tgdg\\Source\\Repos\\IntelFortranOneApiPlayground",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file added SinglyLinkedList/.vs/SinglyLinkedList/v16/.suo
Binary file not shown.
25 changes: 25 additions & 0 deletions SinglyLinkedList/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -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:

/////////////////////////////////////////////////////////////////////////////
8 changes: 8 additions & 0 deletions SinglyLinkedList/SinglyLinkedList.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PROGRAM main
USE mdl_node
IMPLICIT NONE

TYPE(node) :: head
CALL head%new(1)
CALL head%describe()
END PROGRAM main
31 changes: 31 additions & 0 deletions SinglyLinkedList/SinglyLinkedList.sln
Original file line number Diff line number Diff line change
@@ -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
Binary file added SinglyLinkedList/SinglyLinkedList.u2d
Binary file not shown.
54 changes: 54 additions & 0 deletions SinglyLinkedList/SinglyLinkedList.vfproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{B9543C47-4998-4A86-BC91-7D822DCAFEDA}">
<Platforms>
<Platform Name="Win32"/>
<Platform Name="x64"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" WarnInterfaces="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Debug|x64">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" WarnInterfaces="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release|Win32">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" RuntimeLibrary="rtMultiThreadedDLL"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release|x64">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" RuntimeLibrary="rtMultiThreadedDLL"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" SubSystem="subSystemConsole"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true" TargetEnvironment="midlTargetAMD64"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration></Configurations>
<Files>
<Filter Name="Header Files" Filter="fi;fd"/>
<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
<File RelativePath=".\mdl_node.f90"/>
<File RelativePath=".\SinglyLinkedList.f90"/></Filter>
<File RelativePath=".\ReadMe.txt"/></Files>
<Globals/></VisualStudioProject>
28 changes: 28 additions & 0 deletions SinglyLinkedList/mdl_node.f90
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a4b80ea

Please sign in to comment.